Home  »  Solutions  »  What I've Learned  »  Find the Files/Folders Taking Up the Most Space in Unix

Find the Files/Folders Taking Up the Most Space in Unix

Nate Weiner - Posted in What I've Learned, , Comments (0)

If you’re logged into your server and trying to pin down what folders are taking up the most space on your hard drive, there are simple commands to compile an organized list.

First, to see the disk space usage of your drives and partition, run:

df

This will output a list of all drives/partitions on your system, the size, usage and percent used.

If you’d like to see all of the folders in a particular directory sorted by their filesize use the du command.

du -ks ./* | sort -n

Comments


Leave a Reply