Module 32 df

Previous Table of Contents Next


Module 32
df

DESCRIPTION

The external df command displays the disk free space. It is used to find out how much disk space is available in each mounted file system. The df command is used to:

   Display available disk blocks and inodes(files).
   Display total disk blocks and inodes.
   Display available disk blocks without inode count.
   Display the device on which the filesystem is mounted.
   Display total kilobytes in a filesystem.
   Display used kilobytes in a filesystem.
   Display available (free) kilobytes in a filesystem.
   Display percent used of kilobytes and inodes.

BSD (Berkeley)
The BSD version of df supports the same features as System V except for block counts.

COMMAND FORMAT

Following is the general format of the df command.

 df [ -F FStype ] [ -begklntV ] [ SVoptions ] [ -o FSoptions ] filesystem   df [ -F FStype ] [ -begklntV ] [ SVoptions ] [ -o FSoptions ] mount_point   df [ -F FStype ] [ -begklntV ] [ SVoptions ] [ -o FSoptions ] resource 

BSD (Berkeley)
df [ -ai ] [ -t type ] [ filesystem ]
df [ -ai ] [ -t type ] [ file ]

Options

The following options may be used to control how df functions.

-F FStype Specifies the type of file system. Only used for unmounted file systems. The FStype should be specified with the -F option or be found in the /etc/vfstab by matching mount_point , special , or resource . Supported types are s5, ufs, nfs, efs, ffs, and rfs. Not all of these types may be supported on all systems.
-b Display only the number of free kilobytes.
-e Display only the number of free files.
-g Display the entire statvfs structure. Used only for mounted file systems. Cannot use with -beknt options, -o or the SV options.
-k Display allocation information in kilobytes. Should be used by itself since it uses a different format.
-l Display information for local file systems only. Used only for mounted file systems. Cannot use with -o or SVoptions.
-n Display on the FStype name . If no arguments, a list of all mounted file system types is displayed. Used only for mounted file systems. Cannot use with -o or SVoptions.
-t Displays a total listing. Displays the total number of blocks and inodes and the free or available blocks and inodes. Overrides the -ben options.
-V Verify the command line. The command line is echoed back to the screen after df has added information from the /etc/mnttab and /etc/vfstab.
-o FSoptions Used to specify FStype specific options. The FSoptions are a comma-separated list of file system specific options. See your system s User s Reference Manual df command man pages.
-i Displays the number of free and used inodes.
SVoptions These are System V specific options. Refer to your systems df (s5) man page.

BSD (Berkeley)
-i Displays the number of free and used inodes.
-t type Displays only filesystems of a given type. The types are nfs and 4.2. Type nfs is for a Network File System and 4.2 is for a local BSD File System.

Arguments

The following list describes the arguments that may be passed to the df command.

filesystem The filesystem device name. The name of the device where the filesystem resides physically. Such as /dev/da0a or /dev/dsk/c0d0s0.
mount_point The name of the directory where the filesystem is mounted. Referred to as the filesystem mount point.
resource An NFS or RFS resource name.
If no arguments are given then all filesystems currently mounted are reported .

BSD (Berkeley)
file The name of a file within a filesystem. The disk space for the filesystem containing file is displayed. May be a directory, such as the filesystem mount_point.

FURTHER DISCUSSION

A file system is a set of files and directories stored on one physical part of a disk. A device name (/dev/dsk/0s0) or a logical directory name may be used by df to access a file system. For a file system to be checked via its logical name it must be mounted. Mounting a file system makes it available for use. The system becomes aware of the physical media and relates a logical name to it.

In general, the rule of thumb for available space on a file system is 10 percent of the maximum size . If you have a file system that is more than 90 percent full, you should remove all files no longer needed. The system administrator is responsible for keeping file systems within the set guidelines.


BSD (Berkeley)
The BSD system reserves a portion of each file system for allocation routines to work properly. The reserved part is usually 10 percent but may be adjusted by using the super-user command tunefs .
Once a file system reaches 100 percent full, only the super-user can allocate more space.


Previous Table of Contents Next

Copyright Wordware Publishing, Inc.


Illustrated UNIX System V
Illustrated Unix System V/Bsd
ISBN: 1556221878
EAN: 2147483647
Year: N/A
Pages: 144
Authors: Robert Felps

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net