Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Aug 1996 19:59:24 +0200
From:      roberto@keltia.freenix.fr (Ollivier Robert)
To:        freebsd-hackers@freebsd.org
Subject:   Re: AIX/6000 fuser command
Message-ID:  <199608131759.TAA14130@keltia.freenix.fr>
In-Reply-To: <9608130932.AA08532@egeo.unipg.it>; from Giuseppe Vitillaro on Aug 13, 1996 11:32:02 %2B0200
References:  	<9608130932.AA08532@egeo.unipg.it>

next in thread | previous in thread | raw e-mail | index | archive | help
According to Giuseppe Vitillaro:
> (1) does an equivalent command exist under FreeBSD?

You have either fstat  which is standard with  FreeBSD or you can  use LSOF
which you may find in the ports system (CURRENT only).  I don't remember if
it has been committed yet. 

<URL:ftp://coast.cc.purdue.edu/pub/tools/unix/lsof/>;
 
You may use LSOF on 2.2-CURRENT  as of 3.66. Last  is now 3.69. It has been
ported to 2.0.5 and 2.1.0 for a long time.

It is much better than fstat. 

lsof 3.66 usage: [-?abChlnNoOPstUvw] [-c c] [-d s] [-D D] [-F [f]]
 [-g [s]] [-i i] [-k k] [-m m] [-p s] [-r [t]] [-S [t]] [-u s] [-U] [--]
 [names]
Defaults are enclosed in parentheses.  Separate items in a set (s) by commas.
  -?     list help                     -a     AND selections (OR)
  -b     avoid kernel blocks           -c c   list command c
  -C     ignore kernel's name cache    -D D   ?|i|b|r|u[path]
  -d s   select by FD set              -F [f] select fields (-F? for help)
  -g [s] select by process group ID set and print process group IDs
  -h     list help                     -i     select Internet files
  -i i   select by Internet address: [protocol][@name|number][:service|port]
  -k k   kernel sym (/kernel)          -m m   kernel mem (/dev/kmem)
  -l     list UID numbers              -n     don't list host names
  -N     select NFS files              -o     always list file offset
  -O     avoid fork overhead *RISKY*   -p s   select by PID set
  -P     don't list port names         -r [t] repeat output time (15)
  -s     always list file size         -S [t] readlink/stat timeout (15)
  -t     terse listing                 -u s   exclude(^)/select login/UID set
  -U     select Unix socket files      -v     display version information
  -w     suppress warning messages
  names  select named files or files on named file systems
Only root can list all files.  Inaccessible /dev warnings are enabled.
/users/staff/roberto/.lsof_keltia is the default device cache file read path.

-- 
Ollivier ROBERT    -=- The daemon is FREE! -=-    roberto@keltia.freenix.fr
FreeBSD keltia.freenix.fr 2.2-CURRENT #17: Fri Aug  2 20:40:17 MET DST 1996



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608131759.TAA14130>