View size of items in a directory
One may want to see the disk space used by each item (be it subdirectory or file) in a directory in a Linux environment. There are several ways to do that:
for f in `ls`; do du -hs $f; done
This works in most cases but has the minus that it fails if any of the items have spaces in their names. A workaround…