The blog provides Network Security Tips, Tricks, How To/Procedures. Products and areas not limited to Firewalls, Security, Check Point, Cisco, Nokia IPSO, Crossbeam, SecurePlatform, SPLAT, IP Appliance, GAiA, Unix/Linux.

Linux/Unix - How To View File System & Disk Usage/Free Information

In Linux/Unix based operating system, 'df' command can be used to view information about the file system on which each file resides, including used and available disk space details.
 

Syntax:

df [OPTION]... [FILE]...

 

Usage Option:

Mandatory arguments to long options are mandatory for short options too.

-a, --all include dummy file systems
-B, --block-size=SIZE use SIZE-byte blocks
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)
-H, --si likewise, but use powers of 1000 not 1024
-i, --inodes list inode information instead of block usage
-k like --block-size=1K
-l, --local limit listing to local file systems
    --no-sync do not invoke sync before getting usage info (default)
-P, --portability use the POSIX output format
    --sync invoke sync before getting usage info
-t, --type=TYPE limit listing to file systems of type TYPE
-T, --print-type print file system type
-x, --exclude-type=TYPE limit listing to file systems not of type TYPE
-v    (ignored)
    --help display this help and exit
    --version output version information and exit


SIZE may be (or may be an integer optionally followed by) one of following:
kB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.

 

Example:

[admin@Linux]$ df
Filesystem        1K-blocks Used      Available Use% Mounted on 

/dev/cciss/c0d0p1 560086648 328958316 202682660 62%  /
/dev/cciss/c0d0p2 194442    14284     170119    8%   /boot
[admin@Linux]$
[admin@Linux]$
[admin@Linux]$ df -h

Filesystem        Size Used Avail Use% Mounted on
 
/dev/cciss/c0d0p1 535G 314G 194G  62%  /
/dev/cciss/c0d0p2 190M 14M  167M  8%   /boot
[admin@Linux]$



Linux/Unix - How To View File System & Disk Usage/Free Information Linux/Unix - How To View File System & Disk Usage/Free Information Reviewed by Admin on 17:15:00 Rating: 5