lsof (Unix)

Un article de Wikipédia, l'encyclopédie libre.
Aller à : navigation, rechercher

lsof est une commande UNIX qui permet de lister les fichiers actuellement ouverts sur le système.

Exemple :

% lsof
COMMAND    PID        USER   FD      TYPE             DEVICE     SIZE    NODE NAME
init         1        root  cwd   unknown                                     /proc/1/cwd (readlink: Permission denied)
init         1        root  rtd   unknown                                     /proc/1/root (readlink: Permission denied)
init         1        root  txt   unknown                                     /proc/1/exe (readlink: Permission denied)
init         1        root NOFD                                               /proc/1/fd (opendir: Permission denied)
kthreadd     2        root  cwd   unknown                                     /proc/2/cwd (readlink: Permission denied)
kthreadd     2        root  rtd   unknown                                     /proc/2/root (readlink: Permission denied)
kthreadd     2        root  txt   unknown                                     /proc/2/exe (readlink: Permission denied)
kthreadd     2        root NOFD                                               /proc/2/fd (opendir: Permission denied)
migration    3        root  cwd   unknown                                     /proc/3/cwd (readlink: Permission denied)
[…]
lsof      4776 user  txt       REG                3,2   109800  462571 /usr/bin/lsof
lsof      4776 user  mem       REG                3,2  1375536  392869 /lib/libc-2.7.so
lsof      4776 user  mem       REG                3,2   119288  392872 /lib/ld-2.7.so
lsof      4776 user  mem       REG                3,2  1282752  490788 /usr/lib/locale/locale-archive
lsof      4776 user    4r     FIFO                0,6            43598 pipe
lsof      4776 user    7w     FIFO                0,6            43599 pipe

Voir aussi[modifier | modifier le code]

GNU Core Utilities