ftp.nice.ch/pub/next/unix/file/ofiles.tar.gz#/ofiles/ofiles.man

This is ofiles.man in view mode; [Download] [Up]

.TH OFILES 8L LOCAL
.SH NAME
ofiles \- identify open files
.SH SYNOPSIS
.B ofiles
[
.B \-h
] [
.B \-n
] [
.B \-N
] [
.B \-p
] [
.BI \-P " n"
] [
.B \-u
] [
.BI \-U " n"
]
.I names
.SH DESCRIPTION
.I Ofiles
displays the command, process ID (PID), user ID (UID), file descriptor
(FD), type, device, inode and some information about the name of files
opened by NeXTStep 1.0a and 2.0 processes.
.PP
An open file may be a regular file, a directory, a character special
file, or a network file (Internet socket, NFS file or Unix domain socket.)
A specific file may be selected by its path
.IR name .
.SH OPTIONS
.PP
In the absence of any options,
.I ofiles
displays all open files belonging to all active processes.
.PP
If any display request option is specified, all other displays must be
specifically requested \- e. g., if
.B \-n
is specified for the display of Internet network files, NFS files won't be
displayed unless
.B \-N
is also specified.
.TP \w'names'u+4
.B \-h
This option selects a brief usage (help) output display.
.TP
.B \-n
This option selects the display of Internet network files.
.TP
.B \-N
This option selects the display of NFS files.
.TP
.B \-p 
This option specifies that
.I ofiles
should print process identifiers only \- e. g., so that the output may
be piped to
.IR kill (1).
.TP
.BI \-P " n"
This option selects the display of files for the process whose ID is `n'.
.TP
.B \-u
This option selects the display of Unix domain socket files.
.TP
.BI \-U " n"
This option selects the display of files for the user whose user ID
(UID) is `n'.
.TP
.I names
These are the path names of specific files to display.
.SH OUTPUT
.I Ofiles
displays for each open file:
.TP \w'NAME/[LOCAL][REMOTE]'u+4
COMMAND
contains the first seven characters of the name of the Unix command associated
with the process.
.TP
PID
is the process identification (PID) number of the process.
.TP
UID
is the user identification (UID) number of the user to whom the process belongs.
.TP
FD
is the file descriptor (FD) number of the file or ``cd' if it is the
current working directory of the process.
FD is followed by an asterisk if the vnode of the file has non\-zero
shared or exclusive lock counts.
.TP
TYPE
is the type of the vnode associated with the file (see <sys/vnode.h>).
.IP
\&``unix'' is the type for a Unix domain socket that is not associated
with a vnode.
.TP
DEVICE
contains the major and minor device numbers for a character special, block
special, regular or directory file;
.IP
or the protocol type of an Internet network file;
.IP
or the client major and minor device number of a remote, NSF file (under
NeXTStep 1.0a);
.IP
or the network major and minor device number of a remote, NSF file (under
NeXTStep 2.0);
.IP
or the hexadecimal socket address of a Unix domain file.
.TP
INODE
is the inode number of a local file or the inode number of an NFS
file in the server host.
.TP
NAME/[LOCAL][REMOTE]
is the name of the mount point and file system on which the file resides;
.IP
or the name of a file specified in the
.I names
option;
.IP
or the name of a character special or block special device;
.IP
or the local and remote Internet addresses of a network file;
.IP
or the address of a Unix domain socket;
.IP
or the local and remote mount point names of an NFS file.
(A NeXTStep 1.0a local mount point name will be reduced to the last
component of the path.)
.SH DIAGNOSTICS
Errors are identified with messages on the standard error file.
.PP
.I Ofiles
returns a one (1) if any error was detected, including the failure to
locate any
.IR names .
It returns a zero (0) if no errors were detected and if it was able to
display information about all the specified
.IR names .
.SH EXAMPLES
.PP
To display all open files, use:
.IP
ofiles
.PP
To display all open Internet and Unix domain files, use:
.IP
ofiles -n -u
.PP
To display all open files on device /dev/sd0a, use:
.IP
ofiles /dev/sd0a
.PP
To find the process that has /Homes/abe/foo open, use:
.IP
ofiles /Homes/abe/foo
.PP
To send a SIGHUP to the process that has /Homes/abe/bar open, use:
.IP
kill -HUP `ofiles -p /Homes/abe/bar`
.SH BUGS
.PP
Since
.I ofiles
reads kernel memory in its search for open files, rapid changes in kernel
memory may produce unpredictable results.
.PP
For reasons unknown,
.I ofiles
startup, while it is acquiring the major and minor device numbers of
the files in /dev, is slow.
.PP
.I Ofiles
has only been tested under NeXTStep versions 1.0a and 2.0.
.SH AUTHORS
The NeXTStep version of
.I ofiles
was written by Victor A. Abell of the Purdue University Computing Center.
He acknowledges his debt to the work of Dan Bernstein, Michael ``Ford''
Ditto, Tom Dunigan, Alexander Dupuy, Vik Lall, Ray Moody, C. Spencer
and Michael Spitzer, who contributed to versions of
.I ofiles
and its offspring.
.SH SEE ALSO
fs(5).

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.