June 11, 2013
3D Acceleration VMware Workstation 9du command, disk usage with style!
Disk usage: working with du command in linux.
Sometimes we need to work with disk usage in Linux terminals and work with files, such as finding the most critical files in the system for rogue backups or files or simply contraband.
Lets go with:
Find folder size in human readable [Gigs, Megs, Bytes…]
On the
du command
$ du -a 0 ./redhat/rh7 4 ./redhat 4 ./testfile.txt 0 ./linuxKernel 0 ./ubuntu/ub10 4 ./ubuntu 16 .
du human readable
$ du -ah 0 ./redhat/rh7 4.0K ./redhat 4.0K ./testfile.txt 0 ./linuxKernel 0 ./ubuntu/ub10 4.0K ./ubuntu 16K .
du exclusion
du -cbha --exclude="*.txt" 0 ./redhat/rh7 4.0K ./redhat 0 ./linuxKernel 0 ./ubuntu/ub10 4.0K ./ubuntu 12K . 12K total
du custom display type.
$ du -cbha --time 0 2012-05-22 21:52 ./redhat/rh7 4.0K 2012-05-22 21:52 ./redhat 3 2012-06-18 19:23 ./testfile.txt 0 2012-05-22 21:52 ./linuxKernel 0 2012-05-22 21:52 ./ubuntu/ub10 4.0K 2012-05-22 21:52 ./ubuntu 13K 2012-06-18 19:23 . 13K 2012-06-18 19:23 total