List folders and subfolders with size
I want to list my folders and subfolders (recursive) and also show the size of the files in terminal.
I started using this:
I got everything but not the size of the folders.
ls -h -R > /test.txt
Then I tried this:
Suppose to show me everything, but I can't see subfolders. And this command do not accept recursive.
du -h --max-depth=1 > test.txt
How can I show the size of the files and folders like the second command, but including the subfolders?
The Ubuntu Counter Project - user number #14600