jglen is right about the filesystems. I use df -h quite a bit.
But what if you want to the size of individual directories on a file system?
Sometimes I want to know what is taking up all the space on my filesystem.
cd /var
du -sh *
cd log
du -sh *
cd some_application_log_directory
ls -l
You can use this
will list files and their sizes in human readable form in a tree view mode form appending K, M or G when appropiate. You can remove
-L 1 to list recursively or increase the level tree will go down the directory, i.e, use -L 2 ... 3 ...
or
Code:
ls -1s --block-size=K/M/G *
will list files and their sizes in human readable form, where K=Kilobytes, M=Megabytes and G=Gigabytes, so use either one of them as you need.
You may also specify one or different file types
Code:
ls -1s --block-size=M *.{jpg,zip,mp3}
will list every .jpg, .zip and .mp3 files only within the current dir and their sizes in megabytes.
There's also a tool
It's available in every distro. Read here for more info
https://dev.yorhel.nl/ncdu
Lastly, you can change the view mode in your file manager to show more details like size, file type, mtime, atime and anything else your DE's file manager provides.
Hope this helps!
