alternative_folder_size_command

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
alternative_folder_size_command [2025/09/10 12:16] walkeradminalternative_folder_size_command [2025/09/23 13:31] (current) – [Introduction] walkeradmin
Line 17: Line 17:
 \\  \\ 
 ---- ----
 +
 +Remember, this command works from the folder you are in, so if you want to look at all folders, you need to be at the root folder (cd /).
 +\\ 
 +\\ 
 +We are going to use the command <color #ed1c24>du -h --max-depth=1</color> to show folder sizes.
 +\\ 
 +\\ 
 +<color #ed1c24>If you are copying and pasting this command, the two dashes can get converted to one dash (--max-depth=1)</color>
 +\\ 
 +<code>
 +du -h --max-depth=1
 +
 +2.2G    ./usr
 +28M     ./etc
 +4.0K    ./mnt
 +4.0K    ./dev
 +440K    ./.kube
 +4.0K    ./media
 +0       ./proc
 +16K     ./lost+found
 +14G     ./run
 +536K    ./tmp
 +12G     ./opt
 +70M     ./boot
 +18M     ./root
 +0       ./sys
 +4.0K    ./srv
 +788K    ./home
 +26G     ./var
 +
 +52G     .
 +</code>
 +
 +Above we can see the size of each folder, and at the bottom the total size of all folders.
 +\\ 
 +\\ 
  
alternative_folder_size_command.1757506568.txt.gz · Last modified: by walkeradmin