Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

linux command explain du -h –max-depth=1

Can someone explain to me the following command in linux? (I know that with that command you can find the total space taken by each of the directories)

du -h --max-depth=1

Can you suggest a good way to understand in depth these commands?

thanks.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

I assume that you want to know about this command in brief so, I’ll just break it up for you:

  • du: this command is used to estimate file space usage
  • -h: this parameter is short for –human-readable to print sizes in human readable format
  • –max-depth=1: this parameter defines how deep in terms of folder structure level you want to see the output like is its level 1 then,
    output will show the size for all the files and folders in current
    directory but not for the content inside the folders the current
    directory has

You can use this website to learn more about linux commands: https://explainshell.com/explain?cmd=du+-h+–max-depth%3D1

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading