14 lines
184 B
Plaintext
14 lines
184 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
if [ "$1" = "-h" ]; then
|
||
|
cat <<EOF>&2
|
||
|
Usage: ${0##*/}
|
||
|
|
||
|
Print number of open files per process.
|
||
|
|
||
|
EOF
|
||
|
exit
|
||
|
fi
|
||
|
|
||
|
lsof | awk '{x[$1]++} END {for(i in x) print i, x[i]}' | sort
|