[Sussex] Useful one liners

John Crowhurst fyremoon at fyremoon.net
Sun Oct 3 21:36:34 UTC 2004


Hello,

I don't know if anyone has any useful one liners they use, mine is:

du -sh `du -sb * |sort -rn | awk '{print $2}'`

Effectively, it will sort files and directories by size order, largest
first. It won't work with files or directories with spaces in them though.

You can find out which user has the most files in their home directory,
for instance simply by changing into /home and typing that magic
one-liner. Pipe the output through head to capture the highest offenders.





More information about the Sussex mailing list