Linux folder used space - Bash TreeSize

Diese Seite gibt es auch in Deutsch

To find out which folder needs how much space, the command “du” can be used on Debian. For an even better overview there is the commandline tool ncdu, which can analyze all folders similar to TreeSize.


du -ah -d1 /var/www/vhosts

The parameter -d1 shows only first level folders


a... used space for all files and

h...Human Readable, i.e. in a readable format: K, M, ... for kilobytes, megabytes, ...

Memory hog


If the Linux Journal becomes very large, it can be limited as follows:

Only the most recent entries are then kept:

root@server:/var/log/journal# du -ah -d1 
3.8G    ./dbd2984f94c34d65b0839d60d6f48b1b
8.1M    ./53955387d3174396b874db791b202516
3.8G    .

In the following file the journal can be limited:

 vi /etc/systemd/journald.conf

As an example on 500M



PRUNEPATHS customize:

sudo vi /etc/updatedb.conf

sudo updatedb

ncdu - NCurses Disk Usage

With ncdu an overview of the used space for all folders can be displayed very quickly:

sudo apt install ncdu

sudo ncdu / --exclude /media/dreambox --exclude /daten --exclude /backup
positive Bewertung({{pro_count}})
Rate Post:
{{percentage}} % positive
negative Bewertung({{con_count}})

THANK YOU for your review!

Questions / Comments

By continuing to browse the site, you agree to our use of cookies. More Details