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.
>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