Comprobar tamaño de carpetas/archivos en linux

Publicado en 11 noviembre, 2019

Why doesn’t this show the hidden files/folders?

Use

du -sch .[!.]* * |sort -h

in your home folder.

Alternatively, the command I use most frequently is

ncdu

Easy to install if needed:

sudo apt-get install ncdu

How to find out top Directories and files in Linux

Type the following command at the shell prompt to find out top 10 largest file/directories:
# du -a /var | sort -n -r | head -n 10
Sample outputs:

1008372 /var
313236  /var/www
253964  /var/log
192544  /var/lib
152628  /var/spool
152508  /var/spool/squid
136524  /var/spool/squid/00
95736   /var/log/mrtg.log
74688   /var/log/squid
62544   /var/cache

If you want more human readable output try (works with GNU/Linux du version/user only):
$ cd /path/to/some/where
$ du -hsx * | sort -rh | head -10
$ du -hsx -- * | sort -rh | head -10


Sin respuestas to "Comprobar tamaño de carpetas/archivos en linux"


    ¿Algo que comentar?