df(8) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

df(8)

System Administration Commands                                           df(8)



NAME
       df - displays number of free disk blocks and free files

SYNOPSIS
       df [-F FSType] [-abeghklntPVvZ] [-o FSType-specific_options]
            [--scale[=item1,item2,...]]
            [block_device | directory | file | resource ...]

DESCRIPTION
       The df utility displays the amount of disk space occupied by mounted or
       unmounted file systems, the amount of used and available space, and how
       much of the file system's total capacity has been used. The file system
       is specified by device, or by referring to a file or directory  on  the
       specified file system.


       Used  without  operands or options, df reports on all mounted file sys‐
       tems.


       df may not be supported for all FSTypes.


       If df is run on a networked mount point that the  automounter  has  not
       yet  mounted, the file system size will be reported as zero. As soon as
       the automounter mounts the file system, the sizes will be reported cor‐
       rectly.

OPTIONS
       The following options are supported:

       -a

           Reports  on  all  file  systems  including  ones  whose  entries in
           /etc/mnttab (see mnttab(5)) have the ignore option set.


       -b

           Prints the total number of kilobytes free.


       -e

           Prints only the number of files free.


       -F FSType

           Specifies the FSType on which to operate. The -F option is intended
           for use with unmounted file systems. The FSType should be specified
           here or be determinable from /etc/vfstab (see vfstab(5)) by  match‐
           ing  the  directory, block_device, or resource with an entry in the
           table, or by consulting /etc/default/fs. See default_fs(5).


       -g

           Prints the entire statvfs(2) structure. This option  is  used  only
           for  mounted  file  systems. It can not be used with the -o option.
           This option overrides the -b, -e, -k, -n, -P, and -t options.


       -h

           Like -k, except that sizes are in a more human readable format. The
           -h option is equivalent to using the --scale=max,1024 option.

           This  option  overrides the -b, -e, -g, -k, -n, -t, and -V options.
           This option only works on mounted filesystems and can not  be  used
           together with -o option.


       -H

           Like  -h,  except  that values are scaled by 1000 rather than 1024.
           The -H option is equivalent to using the --scale=max,1000 option.

           This option overrides the -b, -e, -g, -k, -n, -t, and  -V  options.
           This  option  only works on mounted filesystems and can not be used
           together with -o option.


       -k

           Prints the allocation in kbytes. The output consists of one line of
           information  for  each  specified  file  system.  This  information
           includes the file system name, the total  space  allocated  in  the
           file  system,  the amount of space allocated to existing files, the
           total amount of space available for the creation of  new  files  by
           unprivileged  users, and the percentage of normally available space
           that is currently allocated to all files on the file  system.  This
           option overrides the -b, -e, -n, and -t options and may not be used
           together with the -v option.


       -l

           Reports on local file systems only. This option is  used  only  for
           mounted file systems. It can not be used with the -o option.


       -n

           Prints  only the FSType name. Invoked with no operands, this option
           prints a list of mounted file system types.  This  option  is  used
           only  for  mounted  file  systems.  It  can not be used with the -o
           option.


       -o FSType-specific_options

           Specifies FSType-specific options. These  options  are  comma-sepa‐
           rated,  with  no  intervening  spaces.  See the manual page for the
           FSType-specific command for details.


       -t

           Prints full listings with totals. This option overrides the -b, -e,
           and -n options.


       -P

           Same as -h except in 512-byte units.


       --scale[=item1,item2,...]

           Prints numbers in a more human readable format. The output consists
           of one line of information for each  specified  file  system.  This
           information  includes  the  file system name, the total space allo‐
           cated in the file system, the amount of space allocated to existing
           files,  the total amount of space available for the creation of new
           files by unprivileged users, and the percentage of normally  avail‐
           able  space  that  is  currently allocated to all files on the file
           system. All sizes are scaled to a human readable format, for  exam‐
           ple,  14K,   234M,  2.7G,  or 3.0T. Scaling is done by repetitively
           dividing by a scale factor of 1024, unless otherwise specified.

           This option overrides the -b, -e, -g, -k, -n, -t, and  -V  options.
           This  option  only works on mounted filesystems and can not be used
           together with -o option.

           --scale specified without arguments enables default scaled  output,
           and is equivalent to --scale=max,1024.

           --scale can be specified with the following arguments.

           binary

               Scaling  is  done by repetitively dividing by a scale factor of
               1024. The use of binary scaling is indicated by the addition of
               an 'i' modifier to the suffix (Ki, Mi, Gi, ...).


           max

               Values  are  scaled  to  the  largest unit for which the result
               retains a non-zero integer part. Up  to  2  decimal  places  of
               fractional output may be shown.


           min

               Values  are  scaled to the smallest unit capable of showing the
               full value within the allotted space of  5  columns,  and  dis‐
               played without the use of fractional output.


           minwide

               Values  are  scaled to the smallest unit capable of showing the
               full value within the allotted space of  8  columns,  and  dis‐
               played without the use of fractional output.


           1000

               Scaling  is  done by repetitively dividing by a scale factor of
               1000.


           1024

               Scaling is done by repetitively dividing by a scale  factor  of
               1024.



       -V

           Echoes  the complete set of file system specific command lines, but
           does not execute them. The command line is generated by  using  the
           options and operands provided by the user and adding to them infor‐
           mation derived from /etc/mnttab, /etc/vfstab,  or  /etc/default/fs.
           This option may be used to verify and validate the command line.


       -v

           Like -k, except that sizes are displayed in multiples of the small‐
           est block size supported by each specified file system.

           This option may not be used with the -k option.

           The output consists of one line of information for each  file  sys‐
           tem. This one line of information includes the following:

               o      the file system's mount point


               o      the file system's name


               o      the total number of blocks allocated to the file system


               o      the number of blocks allocated to existing files


               o      the  number  of blocks available for the creation of new
                      files by unprivileged users


               o      the percentage of blocks in use by files



       -Z

           Displays mounts in all  visible  zones.  By  default,  df  displays
           mounts  located  only  within  the current zone. This option has no
           effect in a non-global zone.


OPERANDS
       The df utility interprets operands according to  the  following  prece‐
       dence:  block_device, directory, file, resource. The following operands
       are supported:

       block_device

           Represents a block special device (for example, /dev/dsk/c1d0s7).


       directory

           Represents a valid directory name. df reports on  the  file  system
           that contains directory.


       file

           Represents  a  valid  file name. df reports on the file system that
           contains file.


       resource

           Represents an NFS resource name.


EXAMPLES
       Example 1 Executing the df command



       The following example shows the df command and its output:


         example% /usr/bin/df

         /                  (/dev/dsk/c0t0d0s0 ):  287530 blocks    92028 files
         /system/contract   (ctfs              ):       0 blocks 2147483572 files
         /system/object     (objfs             ):       0 blocks 2147483511 files
         /usr               (/dev/dsk/c0t0d0s6 ): 1020214 blocks   268550 files
         /proc              (/proc             ):       0 blocks      878 files
         /dev/fd            (fd                ):       0 blocks        0 files
         /etc/mnttab        (mnttab            ):       0 blocks        0 files
         /var/run           (swap              ):  396016 blocks     9375 files
         /tmp               (swap              ):  396016 blocks     9375 files
         /opt               (/dev/dsk/c0t0d0s5 ):  381552 blocks    96649 files
         /export/home       (/dev/dsk/c0t0d0s7 ):  434364 blocks   108220 files



       where the columns represent the mount point, device  (or  "filesystem",
       according  to  df   -k), free blocks, and free files, respectively. For
       contract file systems, /system/contract is the mount point, ctfs is the
       contract   file   system   (used   by  SMF)  with  0  free  blocks  and
       2147483582(INTMAX-1)  free  files.  For  object  file  systems,   /sys‐
       tem/object  is  the  mount  point, objfs is the object file system (see
       objfs(4FS)) with 0 free blocks and 2147483511 free files.

       Example 2 Writing Portable Information About the /usr File System



       The following example writes portable information about the  /usr  file
       system:


         example% /usr/bin/df -P /usr


       Example 3 Writing Portable Information About the /usr/src file System



       Assuming  that  /usr/src is part of the /usr file system, the following
       example writes portable information :


         example% /usr/bin/df -P /usr/src


       Example 4 Using df to Display Inode Usage



       The following example displays inode usage on all ufs file systems:


         example%/usr/bin/df -F ufs -o i


ENVIRONMENT VARIABLES
       When set, any header which normally displays  files  will  now  display
       nodes.  See  environ(7)  for  descriptions of the following environment
       variables that affect the execution  of  df:  LANG,  LC_ALL,  LC_CTYPE,
       LC_MESSAGES, and NLSPATH.

EXIT STATUS
       The following exit values are returned:

       0

           Successful completion.


       >0

           An error occurred.


FILES
       /dev/dsk/*

           Disk devices


       /etc/default/fs

           Default  local  file system type. Default values can be set for the
           following flags in /etc/default/fs. For example:  LOCAL=ufs,  where
           LOCAL is the default partition for a command if no FSType is speci‐
           fied.


       /etc/mnttab

           Mount table


       /etc/vfstab

           List of default parameters for each file system


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE VALUE _ Availabilitysystem/core-os _ Interface StabilityCommit‐
       ted _ StandardSee standards(7).


SEE ALSO
       find(1), statvfs(2), objfs(4FS), default_fs(5),  mnttab(5),  vfstab(5),
       attributes(7), environ(7), standards(7), df_ufs(8), mount(8)

NOTES
       If UFS logging is enabled on a file system, the disk space used for the
       log is reflected in the df report.  The  log  is  allocated  from  free
       blocks  on the file system, and it is sized approximately 1 Mbyte per 1
       Gbyte of file system, up to 256 Mbytes. The log size may be larger  (up
       to  a maximum of 512 Mbytes) depending on the number of cylinder groups
       present in the file system.


       In previous releases of Solaris, there was a /usr/ucb/df command  which
       had  some  differences  from  the  df command described here. There are
       semantic differences with the -t and  -i  options.  The  -t  option  of
       /usr/ucb/df refers to the file system type, while the -t option for the
       df described here prints full listings with totals. The  -i  option  of
       /usr/ucb/df is equivalent to the -o  i option of df.



Oracle Solaris 11.4             23 August 2021                           df(8)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3