no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | lsof [2014/05/09 18:07] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== lsof ====== | ||
+ | ** Show networking on a port ** | ||
+ | |||
+ | < | ||
+ | lsof -iTCP -i :port | ||
+ | lsof -i :22 | ||
+ | </ | ||
+ | |||
+ | ** Show connections to a host ** | ||
+ | |||
+ | < | ||
+ | lsof [email protected]8.1.5 | ||
+ | </ | ||
+ | |||
+ | ** Find ports that are being listened to ** | ||
+ | |||
+ | < | ||
+ | lsof -i | grep LISTEN | ||
+ | </ | ||
+ | |||
+ | ** Find files open by user ** | ||
+ | |||
+ | < | ||
+ | lsof -u < | ||
+ | </ | ||
+ | |||
+ | ** Find files open by command ** | ||
+ | |||
+ | < | ||
+ | lsof -c < | ||
+ | </ | ||
+ | |||
+ | ** Find files open by proccess id ** | ||
+ | |||
+ | < | ||
+ | lsof -p < | ||
+ | </ |