About
duf is a disk usage viewer that replaces the plain filesystem listing with a colour-coded table showing size, used, available and mount point. It groups and sorts the results so real storage stands out from virtual filesystems. Use it to answer how much space is left.
Install it
pkg install duf
Run this inside Termux. If the package is already present, pkg will say so and
do nothing.
Commands worth knowing
6 of the invocations you will actually reach for. Tap the copy button to put one on your clipboard.
duf Show a table of mounted filesystems with size, usage and mount point. The fullest are easy to find. duf -only local Restrict the table to local devices. Network and virtual mounts that only add clutter are hidden. duf -hide-fs tmpfs Hide filesystems of a given type. Temporary in-memory mounts drop out of the report. duf -sort size Order the table by total size. The largest devices appear first. duf --output json Emit the data as JSON. Another program can parse it rather than you reading it by eye. duf -hide-mountpoints /proc,/sys Exclude specific mount points. System directories stay out of the listing. Worked example
Run duf -only local and this is what you should see.
$ duf -only local
MOUNT POINT SIZE USED AVAIL USAGE% TYPE
/ 24.0G 9.1G 14.9G 38% ext4
/sdcard 119.2G 61.4G 57.8G 52% sdcardfs
/data 48.0G 20.3G 27.7G 42% ext4 Developed by
Christian Muehlhaeuser · released under MIT.