Linux folder used space - Bash TreeSize
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
du -ah -d1 /var/www/vhosts
The parameter -d1 shows only first level folders
-mh
a... used space for all files and
h...Human Readable, i.e. in a readable format: K, M, ... for kilobytes, megabytes, ...
Memory hog
Journal
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
SystemMaxUse=500M
SystemMaxFileSize=100M
/var/lib/mlocate
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
After Installation for example the Root-Partition can be scanned using the following command:
sudo ncdu / -x
The Parameter -x excludes other mounted Disks (Do not cross filesystem boundaries, i.e. only count files and directories on the same filesystem as the directory being scanned.)

{{percentage}} % positive

THANK YOU for your review!
Top articles in this section
After I installed a fan in my NAS, it always ran at top speed. In the BIOS I could set the speed, but the automatic mode did not work properly. Using the service fancontrol the speed of the fan can be linked to any sensor and any threshold and controlled automatically.
The currently available Linux kernel has the version: 6.6.4 (found: 2023-12-04). Source: www.kernel.org. The Linux distributions, as an example Debian or Ubuntu used new kernel versions only with some delay, accordingly the used kernel versions are usually somewhat older. Which kernel is active on a Linux system can be read out with the following command:
In my search for file system features like snapshots or deduplication, I ended up with the file systems ZFS and later BTRFS. In the Linux environment, the ext4 file system is currently a quasi-standard, but file systems like ZFS and BTRFS offer considerable added value.