
The duf utility is nothing but an enhancement of what du and df commands do to check used and free space in a structured and eye-pleasing way. Duf is one of the new CLI tools that is gaining quite some popularity among Linux users.
To install duf on Ubuntu, you can use the apt package manager:
Command: apt install duf
You can simply use duf without any options and it will get you a list of mounted devices:
Command: duf
You can use duf to list one or more devices at the same time. You just have to specify the path of the mounting port or device and that’s it:
Command: duf /dev /media/root/Ubuntu 22.04.1 LTS amd64/
The duf utility provides various options so that you can filter output and have intended results. For instance, you can the –only option to show only specific devices:
Command: duf –only local
And if you want to list specific filesystems, you can use –only-fs and append filesystem types.
Command: duf –only-fs tmpfs
Furthermore, you can also sort the output based on a variety of keys such as size, usage, and more using the –sort option.
Command: duf –sort usage
If you want the output in JSON format, then you can use –json option:
Command: duf –json
In case, if you want to save the output in a text file, you can redirect the standard output to the text file:
Command: duf –json > techhyme.json
You may also like:
- Tool Categories in Kali Linux – A Brief Overview
- 100+ Important Linux Terms and Technologies
- How to Use Kali Linux for OSINT Automation
- How to Perform Network Security Audits Using Kali Linux
- How to Harden Kali Linux for Maximum Security
- How to Use Kali Linux for Cloud Security Testing
- How to Fix Common Kali Linux Installation Errors
- How to Use Python for Ethical Hacking in Kali Linux
- How to Write Bash Scripts in Kali Linux
- How to View SSH Logs on Linux