Linux Disk Usage
Linux has a few means to analyze a disk for space usage.
One way, is a package called, ncdu.
It can be downloaded with:
sudo apt install ncdu
You execute it, like this:
sudo ncdu -x /
NOTE: -x forces it to stay within the same filesystem, and not traverse other mounts.
You can add the -r switch, to make it read-only.
When run, it will iterate the filesystem, and create an interactive usage list, like this:
Clearing Tmp Folder
Ansible likes to push container images and other things into the /tmp folder of its host.
Here’s a quick command to clear temp files that are older than 10 days:
sudo find /tmp -type f -atime +10 -delete
No Comments