show_directories_with_sizes

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
show_directories_with_sizes [2025/02/28 15:59] walkeradminshow_directories_with_sizes [2025/02/28 16:05] (current) – [LIst Directories with Size] walkeradmin
Line 1: Line 1:
 ====== Show Directories with Sizes ====== ====== Show Directories with Sizes ======
-<color #db5f0b>Feb 2022</color>+<color #db5f0b>Feb 2025</color>
 \\  \\ 
 \\  \\ 
  
 ---- ----
 +===== Introduction =====
 +When we list directories, we generally just get permissions and dates of a directory, but sometimes, especially when we are trying to track down large directories that are consuming space, we want to list those directories with their file sizes.
 +\\ 
 +\\ 
 +----
 +==== LIst Directories with Size ====
 +This is very simple to do, just use the following command:
 +\\ 
 +    du -sh *
  
- +If you are in the root, you will see all the top level folders and subfolders, or you can run this from a specific folder and just see the subfolders there. 
- +\\  
- +<code> 
-du -sh *+0       bin 
 +225M    boot 
 +0       dev 
 +27M     etc 
 +72K     home 
 +0       lib 
 +0       lib64 
 +16K     lost+found 
 +4.0K    media 
 +4.0K    mnt 
 +4.0G    opt 
 +0       proc 
 +5.5M    root 
 +13G     run 
 +0       sbin 
 +4.0K    srv 
 +0       sys 
 +28K     tmp 
 +2.1G    usr 
 +32G     var 
 +</code> 
 +In the above example, we can see a listing of folders from the root, along with their folder sizes. 
 +\\  
 +\\  
 +----
show_directories_with_sizes.1740758367.txt.gz · Last modified: by walkeradmin