Post

Linux: lsof

Linux: lsof

Files

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# show all open Files
lsof /var

# suppress open files by kernel
lsof -b

# show the count of all open files
lsof | wc -l

# show open files per user
lsof -u steh

# show all open files under a directory
lsof +D /var/www

Open Networkports

1
2
3
4
5
6
7
8
# show all open ports
lsof -i

# show all open TCP Ports
lsof -i tcp

# find which process is using a specific port
lsof -i :8080

References

This post is licensed under CC BY 4.0 by the author.