[nycbug-talk] fun one liners
Ray Lai
nycbug at cyth.net
Thu Jun 8 11:44:52 EDT 2006
On Thu, Jun 08, 2006 at 11:38:27AM -0400, Pete Wright wrote:
> hey all,
> so i've been following a thread on the freebsd-stable@ list where a user
> was having problems finding which files are open by a given process.
> well...this lead to a lengthy discussion where everyone seemed to reply
> /usr/port/sysutils/lsof ;)
>
> although one guy posted this:
> % fstat | grep 'httpd.*/var ' | awk '{print $6}' | xargs -n 1 sudo find \
> -x /var -inum | sort -u
> %
>
> now that's a fun oneliner i've been missing for a while, which leads to
> think: what other good oneliners do peep's on talk@ have lurking in their
> $HOME's....
I frequently use:
$ du -ks * 2>/dev/null | sort -n
to find out which directories are hogging up the most space.
-Ray-
More information about the talk
mailing list