du command in Linux

 du(Disk Usage) - This command is use to check the size of file and directory. 

Check the size of file

$ du filename/directory

Check multiple file and directory size

$ du file1 file2 dir1 dir2

Check all files and directory size in human-readable format

$ du -h  filename

Check total size of any directory (use -s option)

$ du -sh /usr/local

Check all files and directory size of current directory

$ du -sh *

Check all files and directory size with -c option 

$ du -ch *

4.0K service

532K v2.5.5.zip

4.0K web.json

4.0K webserver.yml

544K total

Check the sized based on modified time

du -sh --time filename 


Share on Google Plus

About Penguin Technology

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

0 comments:

Post a Comment