Mercurial > hg > config
diff .bashrc @ 103:e841c419199e
add process command to get filehandles
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 01 Nov 2010 13:44:46 -0700 |
parents | 35d28c0a6ba3 |
children | bf567a0e8fef |
line wrap: on
line diff
--- a/.bashrc Thu Oct 28 14:05:35 2010 -0700 +++ b/.bashrc Mon Nov 01 13:44:46 2010 -0700 @@ -148,7 +148,7 @@ if [ "$#" == "0" ] then - args="." + args="tmp" else args=$@ fi @@ -312,6 +312,13 @@ done } +filehandles() { + TMPFILE=$(tmpfile) + ps -e|grep -v TTY|awk {'print "echo -n \"Process: "$4"\tPID: "$1"\tNumber of FH: \"; lsof -p "$1"|wc -l"'} > ${TMPFILE} + . ${TMPFILE} | sort + rm ${TMPFILE} +} + ### include overrides for commands source ~/.bash_overrides