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: #cd / huge_directory #du -k . (current directory size given in kilobytes) To find the sizes recursively (subdirectories): #cd / huge_directory #sh #for size in 'ls' do du -k $size echo $size done done
Get tips on any operations or functions done on or by the linux operating systems, debian, ubuntu, fedora etc..