A Blog Of Random Coding Techniques & Experiments Robert Askam

Find largest folder/files on a server Post Find largest folder/files on a server 1 year ago

The following command will show you the top 10 largest folders on a server. Change [FOLDER LOCATION] to /data or whatever you require.

du -a [FOLDER LOCATION] | sort -n -r | head -n 10
e.g. du -a /foldername | sort -n -r | head -n 10