Datasheet
“main” (Installation and Administration) — 2004/6/25 — 13:29 — page 708 — #734
i
i
i
i
i
i
i
i
For each of the commands introduced, examples of the relevant outputs are
presented. In these examples, the first line is the command itself (after the
dollar sign prompt). Comments are indicated by the use of square brackets
[...] and long lines are wrapped where necessary. Line breaks for long
lines are indicated by a backslash (\).
$ command -x -y
output line 1
output line 2
output line 3 is annoyingly long, so long that \
we have to break it
output line 3
[...]
output line 98
output line 99
The descriptions have been kept short to allow as many utilities as possible
to be mentioned. Further information for all the commands can be found
in the man pages. Most of the commands also understand the parameter
--help, which produces a brief list of the possible parameters.
28.1 List of Open Files: lsof
To view a list of all the files open for the process with process ID hPIDi, use
-p. For example, to view all the files used by the current shell, enter:
$ lsof -p $$
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
zsh 4694 jj cwd DIR 0,18 144 25487368 /suse/jj/t (totan:/real-home/jj)
zsh 4694 jj rtd DIR 3,2 608 2 /
zsh 4694 jj txt REG 3,2 441296 20414 /bin/zsh
zsh 4694 jj mem REG 3,2 104484 10882 /lib/ld-2.3.3.so
zsh 4694 jj mem REG 3,2 11648 20610 /usr/lib/zsh/4.2.0/zsh/rlimits.so
[...]
zsh 4694 jj mem REG 3,2 13647 10891 /lib/libdl.so.2
zsh 4694 jj mem REG 3,2 88036 10894 /lib/libnsl.so.1
zsh 4694 jj mem REG 3,2 316410 147725 /lib/libncurses.so.5.4
zsh 4694 jj mem REG 3,2 170563 10909 /lib/tls/libm.so.6
zsh 4694 jj mem REG 3,2 1349081 10908 /lib/tls/libc.so.6
zsh 4694 jj mem REG 3,2 56 12410 /usr/lib/locale/de_DE.utf8/LC_TELEPHONE
[...]
zsh 4694 jj mem REG 3,2 59 14393 /usr/lib/locale/en_US/LC_NUMERIC
zsh 4694 jj mem REG 3,2 178476 14565 /usr/lib/locale/en_US/LC_CTYPE
zsh 4694 jj mem REG 3,2 56444 20598 /usr/lib/zsh/4.2.0/zsh/computil.so
zsh 4694 jj 0u CHR 136,48 50 /dev/pts/48
zsh 4694 jj 1u CHR 136,48 50 /dev/pts/48
zsh 4694 jj 2u CHR 136,48 50 /dev/pts/48
zsh 4694 jj 10u CHR 136,48 50 /dev/pts/48
The special shell variable $$, whose value is the process ID of the shell, has
been used.
708
28.1. List of Open Files: lsof










