I've been looking around about how can i extract the size of each subfolder in the current directory. The issue is that find works recursively by default, and this will cause calculating the size of each subdirectory recursively.
The solution is to limit find depth by the parameter "maxdepth":
> find . -type d -maxdepth 1 -exec du -sh '{}' \;
No comments:
Post a Comment