Jack Hacks

Friday, March 16, 2007, 10:41 PM ( 3 views ) - Linux
As simple as this:


lsof -n -u^65534,^`cat /etc/passwd | awk -F':' '{if($3 < 32000) print $3}' | xargs | sed -e 's/ /,\^/g'` -i | awk '{if ($2 ~ /[0-9]*/) print $3, $1}' | sort | uniq -c | sort -n


The awk part is for excluding the system users ids < 32000.
permalink  | 

<Back | 1 | 2 | Next> Last>>