Skip to main content

du is your friend. If you just want doto know the total size of a directory then jump into it and run:

du -hs 

If you also would like to know which sub-folders spendtake up how much disk space?! You could extend this command to:

du -h --max-depth=1 | sort -hr 

which will give you the size of all sub-folders (level 1). The output will be sorted (largest folder on top).

du is your friend. If you just want do know the total size of a directory then jump into it and run:

du -hs 

If you also would like to know which sub-folders spend how much disk space?! You could extend this command to:

du -h --max-depth=1 | sort -hr 

which will give you the size of all sub-folders (level 1). The output will be sorted (largest folder on top).

du is your friend. If you just want to know the total size of a directory then jump into it and run:

du -hs 

If you also would like to know which sub-folders take up how much disk space?! You could extend this command to:

du -h --max-depth=1 | sort -hr 

which will give you the size of all sub-folders (level 1). The output will be sorted (largest folder on top).

du is your friend. If you just want do know the total size of a directory then jump into it and run:

du -hs

du -hs 

If you also would like to know which subfolderssub-folders spend how much disk space?! You could extend this command to:

du -h --max-depth=1 | sort -hr

du -h --max-depth=1 | sort -hr 

which will give you additionally the size of all subfolderssub-folders (level 1). The output will be sorted (largest folder on top).

du is your friend. If you just want do know the total size of a directory then jump into it and run:

du -hs

If you also would like to know which subfolders spend how much disk space?! You could extend this command to

du -h --max-depth=1 | sort -hr

which give you additionally the size of all subfolders (level 1). The output will be sorted (largest folder on top).

du is your friend. If you just want do know the total size of a directory then jump into it and run:

du -hs 

If you also would like to know which sub-folders spend how much disk space?! You could extend this command to:

du -h --max-depth=1 | sort -hr 

which will give you the size of all sub-folders (level 1). The output will be sorted (largest folder on top).

Source Link
Chrispie
  • 3.9k
  • 2
  • 16
  • 17

du is your friend. If you just want do know the total size of a directory then jump into it and run:

du -hs

If you also would like to know which subfolders spend how much disk space?! You could extend this command to

du -h --max-depth=1 | sort -hr

which give you additionally the size of all subfolders (level 1). The output will be sorted (largest folder on top).