ustat
file systemLinux/Unix
The ustat command is one of the most frequently used commands in Linux/Unix-like operating systems. ustat Display file system statistics
Quick Reference
Command Name:
ustat
Category:
file system
Platform:
Linux/Unix
Basic Usage:
ustat [options] [arguments]
Common Use Cases
Syntax
ustat [-fv] device
Options
| Option | Description |
|---|---|
-f |
Include the file system type in the display |
-v |
Display verbose information |
device |
The device to display statistics for |
Examples
How to Use These Examples
The examples below show common ways to use the ustat command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
Basic Examples:
Display file system statistics for a device
sudo ustat /dev/sda1
Display file system statistics including the filesystem type
sudo ustat -f /dev/sda1
Display verbose file system statistics
sudo ustat -v /dev/sda1
Advanced Examples:
Compare with more modern tools like df
echo "ustat output:"
sudo ustat /dev/sda1echo "df output:" df -h /dev/sda1
Get file system statistics for all mounted devices using a loop
for device in $(mount | grep '^/dev' | cut -d' ' -f1); do
Save file system statistics to a log file
sudo ustat -v /dev/sda1 > filesystem_stats.log