SG DF Command Generator

SanchitGurukul Linux Utility

DF Command Generator

Build copy-ready df commands to inspect disk capacity, filesystem types, mount usage, and inode consumption.

💾Safe command builderCommands are generated locally
Step 1

Choose what to inspect

Output options
Filesystem filters
Custom columns and reporting
Predefined commands

Useful DF examples for daily work

Search by task, review what each command does, and copy it directly.

BasicReadable disk overview

Shows total, used, and available capacity for all mounted filesystems in human-readable units.

df -h
Use when: You need a quick server disk-space check.
BasicShow filesystem types

Adds the filesystem type so you can distinguish ext4, XFS, tmpfs, NFS, and other storage.

df -hT
Use when: You need to identify local, temporary, or network filesystems.
TroubleshootingCheck inode exhaustion

Displays inode usage instead of byte usage. A filesystem can run out of inodes even when free space remains.

df -ih
Use when: You see “No space left on device” unexpectedly.
FilesystemCheck a specific path

Reports the filesystem that contains /var/log, without requiring you to know its device name.

df -h /var/log
Use when: An application directory is growing or failing to write.
FilesystemShow local filesystems only

Excludes remote filesystems and focuses the report on storage attached locally to the system.

df -h --local
Compatibility: GNU/Linux; macOS and BSD use different options.
FilesystemExclude temporary filesystems

Removes common memory-backed pseudo filesystems for a cleaner physical-storage report.

df -h -x tmpfs -x devtmpfs
Use when: You want to reduce clutter in Linux output.
FilesystemShow only ext4 filesystems

Filters the report to filesystems whose type is ext4.

df -h -t ext4
Adapt it: Replace ext4 with xfs, nfs, or another supported type.
ReportingAdd a combined total

Adds a final summary row that combines the displayed filesystem capacities.

df -h --total
Compatibility: GNU/Linux.
ReportingFind filesystems at 80%+

Keeps the heading and displays filesystems whose usage percentage is 80 or higher.

df -hP | awk 'NR==1 || $5+0 >= 80'
Use when: Performing capacity checks or routine monitoring.
ReportingSort by usage percentage

Sorts the filesystem rows numerically by the percentage-used column.

df -hP | sort -k5 -n
Tip: Add -r to sort to show the fullest entries first.
ReportingCreate a focused report

Displays only the device, size, used space, free space, percentage, and mount point.

df -h --output=source,size,used,avail,pcent,target
Compatibility: GNU/Linux.
TroubleshootingInspect NFS mounts

Shows capacity and mount information only for NFS filesystems.

df -hT -t nfs -t nfs4
Use when: Diagnosing remote storage capacity or mount availability.
Help guide

How to use the DF command

1

Start with a readable overview

Run df -h to see mounted filesystems, total size, used space, available space, utilization percentage, and mount points.

2

Check a specific location

Use df -h /var/log to identify the filesystem that stores a path. This is often more useful than guessing the device name.

3

Check inodes when space looks free

Run df -ih when applications report “No space left on device” but byte capacity remains. Too many small files can exhaust inodes.

4

Verify filesystem types

Use df -hT before filtering local, temporary, or network-backed filesystems.

5

Interpret the result

Use% is the percentage consumed. Very high usage can prevent logs, databases, updates, and applications from writing data.

6

Confirm platform support

Use df --help on GNU/Linux or man df on any Unix-like system because options differ across platforms.

Quick option reference

OptionPurposeExample
-hHuman-readable powers of 1024df -h
-HHuman-readable powers of 1000df -H
-iShow inode usage instead of bytesdf -ih
-TShow filesystem typedf -hT
-tInclude a filesystem typedf -h -t ext4
-xExclude a filesystem typedf -h -x tmpfs
-PPortable POSIX outputdf -P
--outputSelect GNU output columns--output=source,pcent,target
Diagnostic tip

Use both df -h and df -ih. Byte capacity and inode capacity are separate limits.

Important distinction

df reports filesystem capacity. Use du when you need to determine which directories or files consume the space.

Your feedback matters

Was this post helpful?

0 reactions