1
2 lsof
3
4
5 lsof /path/to/file
6
7
8 lsof +D /path
9
10
11 lsof -u name
12 lsof -u name1,name2
13 lsof -u name1 -u name2
14
15
16 lsof -c apache
17
18
19 lsof -u www-data -c apache
20
21
22 lsof -p 1
23
24
25 lsof -p ^1
26
27
28 lsof -i
29 lsof -i tcp
30 lsof -i udp
31
32
33 lsof -i :25
34 lsof -i :smtp
35 lsof -i udp:53
36 lsof -i tcp:80
37
38
39 lsof -a -u name1 -i
40
41 lsof -N
42 lsof -U
43
44
45 lsof -t -i
46 kill -9 $(lsof -t -i)
47
CategoryCheatSheet
SamatsWiki: CheatSheet/lsof (last edited 2010-11-25 08:55:24 by SamatJain)