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.
I assume that you want to know about this command in brief so, I'll just break it up for you:
You can use this website to learn more about linux commands: https://explainshell.com/explain?cmd=du+-h+--max-depth%3D1
I recommend you to use du --help
or man du
to get help, and try these command yourself. You can remove or change any arguments and find out the differences between them.
-h
means human readable, it will display the size like 1K
or 3.5G
, rather than only a number.
--max-depth=1
means it will only count the files and directories in current directory, sub-directories and sub-files will not display.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With