linux du list all folders and subfolder space code example
Example 1: linux check used space in folder
du -h --max-depth=1
Example 2: shell get size of directory
du -h your_directory
# gives you the size of your target directory.
du -hcs your_directory
# If you want a brief output.