$linuxcli.in _    [commands]    [tips & tricks]    [manpage]    [ESXi CLi]    [what is my ip?]    [pingme!]    [BIOS lock code]    [Code repo]


{

Find large size directory content which eat space

}

  du command -h show                  unique command is to
  human readable size                 display repetitive
  format by the number of             output in to single  
  increase in digit the               output.
  size name increase from                  |
  from bytes to kilo-bytes                 |
  from kilo-bytes to   |                   |
  mega-bytes and so on.|                   |        Redirect error output
                       |___     pipe       |        in a given file.
                       |   |     \         |           |
                       |   |      \        |           |
# find / -type d -exec du -h {} \; | sort|uniq|sort -h 2> /dev/null
  |                  |       |   |    |        |_____|           |
  |__________________|       |___|    |              |           |
                     |       |        |_             |____       Place at where
                     |       |          \                 |      there is no end.
      find command -type d will        To segregate the   |      Redirect the output
      search only directory type       list with common   |      in null device if
      file and -exec will run          output.            |      you do not want to
      du command as supplied to                           |      store the output.
      find command.                                       | 
                                               sort command with -h
                                               option will sort lines
                                               by human readable data
                                               size format.

Last updated on 18 February 2025 7:44 am IST