Sometimes you want to ascertain the space hogs on your system. You might have noticed that a certain top level directory is larger than usual, but you are unsure what subdirectory or subdirectories are the culprits.
Here’s an example of what can be done:
#du -k . (current directory size given in kilobytes)
To find the sizes recursively (subdirectories):
#for size in ‘ls’
du -k $size
echo $size done