View and Check Directory Size on Linux Fedora Using du Command



Computer Configuration GNU Linux Fedora using Linux Command

 

   The step by step by step command example below show the use of du command to view and check the directory size on Linux.  The du command is use on the command example below to check the directory size on Linux Fedora 9. 

The command below use the du command to check the Desktop directory size and including all files and directories on inside the directory.

Check Directory Size on Linux Fedora Using du Command

[root@fedora ~]# du -h Desktop/

304K    Desktop/printer

220K    Desktop/fedora_9/dmidecode

56K     Desktop/fedora_9/free

128K    Desktop/fedora_9/sha1sum

140K    Desktop/fedora_9/fdisk

88K     Desktop/fedora_9/sysreport

1.6M    Desktop/fedora_9

2.1M    Desktop/

[root@fedora ~]#

 

The command example below show the du command with option -sh to view the directory size only.

View Directory Size on Linux Fedora Using du Command

[root@fedora ~]# du -sh Desktop/

2.1M    Desktop/

[root@fedora ~]#

 




1 comments:

Anonymous said...

Thank you very much... it was great help!