know df command better with its examples

  • About df : It reports file system disk space usage
  • It comes from “coreutils-8.4” package.
  • Path: /bin/df

Examples:

1. To to get the file system usage in human readable format

$ df -h 

2. To get the file system usage for all the file systems including dummies

$ df -a

3. To get the file system usage in specified block size

$ df -B=1024
$ df –block-size=1024 

4. To get the usage for a file instead of a mount point

$ df –direct

5. To get the grant total

$ df –total

6. To get the usage in powers of 1000 instead of 1024

$ df -H

7. To get the inode information instead of block usage

$ df -i

8. To get the usage as 1k block (i.e. –block-size=1K)

$ df -k

9. To get the file system usage for local file systems

$ df -l
$ df –local 

10. Do not invoke sync before getting usage info

$ df –no-sync

11. To get the o/p in POSIX format

$ df -P
$ df –portability 

12. To invoke sync before getting usage info

$ df –sync

13. To limit listing to file systems of type TYPE

$ df -t=ext3
$ df –type=ext3 

14. To print file system type

$ df -T
$ df –print-type 

15. To limit listing to file systems not of type TYPE

$ df -x=ext4
$ df –exclude-type=ext4

16. To get the version information of the file system

$ df –version

Leave a Reply

Your email address will not be published. Required fields are marked *