Weighing in with Ncdu
Ncdu to Go
Ncdu can also redirect the output to a file for later analysis, as follows:
ncdu /home/Downloads -o Downloads-txtcommand
The following command:
ncdu -1xo- /home/Downloads | gzip >Downloads.gz
dumps the output into an archive format. To view the archive later on, enter:
zcat Downloads.gz | ncdu -f-
To view the unpacked text version, use:
ncdu -f Downloads.txt
Conclusions
Ncdu is a useful tool for analyzing the available disk space and locating and removing the biggest space-wasting files. In addition to the other benefits of working at the command line, Ncdu is faster than its GUI-enabled colleagues. You can also include Ncdu in scripts or run it as a cronjob.
« Previous 1 2
Buy this article as PDF
Express-Checkout as PDF
Price $2.95
(incl. VAT)
(incl. VAT)