Linuxcat.org

Full Version: how to display file and folder sizes in CentOS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Type the following command to show file sizes:

Code:
du -h --max-depth=1


This command will list the files and folders in the current directory as well as show the complete size of the folders and files.

e.g.

[[email protected] var]# du -h --max-depth=1
76K ./qmail
7.5G ./www
4.0K ./local
4.0K ./tmp
116K ./run
4.0K ./games
681M ./log
4.0K ./opt
212K ./named
160K ./cache
4.0K ./preserve
8.0K ./db
24K ./lock
4.0K ./yp
217M ./lib
12K ./empty
248K ./spool
4.0K ./nis
8.4G .
Reference URL's