Wednesday, 27 February 2008

Sorting out the Disk hogs!

Sorting out the disk hogs

If you have a full or near full fs, or you are being proactive and doing some preventative housekeeping on directories etc, here are some good commands to use;


du /export/home | sort –nr | more

using this alongside

find /export/home –mtime 1


will get you a pretty good picture of what you want to look at. Note that /export/home is just an example used here, but usually you are looking around that area anyway (or its a good place to start, especially if it sits under the root filesystem)


Alternatively, this is a powerful command;

du –sk * | sort –rnk1

No comments: