One linux Command every day (33): df command

Source: Internet
Author: User
Tags touch command inode usage

One linux Command every day (33): df command link: One linux Command every day (1): ls command http://www.bkjia.com/ OS /201210/163049.html#linuxlinuxcommand every day (2): cd command serial (3 ): pwd command Export (4): mkdir command http://www.bkjia.com/ OS /201210/1620.3.html#a linuxcommand every day (5): rm command Export (6): rmdir command http://www.bkjia.com/ OS /201210/164017.h Tml; one linux Command every day (7): mv command running (8): cp command http://www.bkjia.com/ OS /201210/163164.html#a linuxcommand every day (9): touch command running (10): cat command running (11 ): nl command http://www.bkjia.com/ OS /201211/165990.htmla linuxcommand every day (12): more command http://www.bkjia.com/ OS /201211/165994.htmllinuxcommand every day (13): l Ess command restart (14): head command restart (15): tail command http://www.bkjia.com/ OS /201211/168702.htmllinuxcommand every day (16): which command restart (17): whereis command restart (18 ): locate command http://www.bkjia.com/ OS /201211/168895.htmla linuxcommand every day (19): find command overview htt P: // extract (20): exechttp of the find command: // www.bkjia.com/ OS /201211/168901.htmllinuxlinuxcommand every day (21): xargshttp of the find command: // encrypt (22 ): detailed description of the parameters of the find command: http://www.bkjia.com/ OS /201211/168912.htmla linuxcommand every day (23): Linux directory structure (24): Linux file type and extension (25): Linux File Attribute explanation example (26): Use SecureCRT to upload and download files example (27): linux chmod command example (28): tar command http://www.bkjia.com/ OS /201212/172.161.htmllinuxcommand every day (29 ): chgrp command http://www.bkjia.com/ OS /201212/172983.htmla linuxcommand every day (30): chown command http://www.bkjia.com/ OS /201212/173239.htmla Li every day Nux command (31):/etc/group file DETAILS http://www.bkjia.com/ OS /201212/174429.htmlevery day a linuxcommand (32): gzip command http://www.bkjia.com/ OS /201212/174431.html df command in linux is used to check the linux Server File System disk space usage. You can use this command to obtain the space occupied by the hard disk and the remaining space. 1. Command Format: www.2cto.com df [Option] [file] 2. Command function: display the available space of the specified disk file. If no file name is specified, the available space of all mounted file systems will be displayed. By default, the disk space is displayed in 1KB. Unless the environment variable POSIXLY_CORRECT is specified, it is displayed in 512 bytes. command Parameter: Required parameter:-a list Of all file systems-h for ease of reading. The value-H equals to "-h", but the formula is 1 K = 1000, instead of 1 K = 1024-i display inode information-block k is 1024 bytes-l only display local file system-block m is 1048576 bytes -- no-sync ignore sync command-P output format is POSIX -- sync before obtaining disk information, run the sync command-T file system type selection parameter: -- block-size = <block size> specified block size-t <file system type> only displays the disk information of the selected file system-x <file system type> does not display disk information -- help display help information -- version display version information 4. use instance: www.2cto.com instance 1: Display disk usage command: d F output: [root @ CT1190 log] # df file system 1 K-available block used % mount point/dev/sda7 19840892 890896 17925856 5% // dev/sda9 203727156 112797500 80413912 59%/opt/ dev/sda8 4956284 570080 4130372 13%/var/dev/sda6 19840892 1977568 16839184 11%/usr/dev/sda3 988116 23880 913232 3%/boottmpfs 16473212 0 16473212 0%/dev/shm description: in linux, column 1st of the output list of the df command represents the path name of the device file corresponding to the file system (usually the partition on the hard disk ); column 2nd shows the number of data blocks (1024 bytes) contained in the partition. Column 3 and 4 indicate the number of used and available data blocks, respectively. The user may be surprised that the sum of the blocks in column 3 and 4 is not equal to the number of blocks in column 3. This is because by default, each partition leaves a small amount of space for the system administrator to use. Even if the common user space is full, the administrator can still log on and leave the workspace required to solve the problem. The Use % column in the list indicates the percentage of space used by normal users. Even if the number reaches 100%, the partition still has space for the system administrator. Finally, the Mounted on column indicates the mount point of the file system. Instance 2: Display disk usage in inode mode command: df-I output: [root @ CT1190 log] # df-I file system Inode (I) used (I) available (I) % mount point/dev/sda7 5124480 5560 5118920 1%/dev/sda9 52592640 50519 52542121 1%/opt/dev/sda8 1280000 8799 1271201 1%/var/dev/sda6 5124480 80163 5044317 2%/usr/dev/sda3 255232 34 255198 1%/boottmpfs 4118303 1 4118302 1%/dev/shm description: instance 3: display the command df-t ext3 output of the specified disk type: [root @ CT1190 log] # df-t ext3 File System 1 K-block used available % mount point/dev/s Da7 19840892 890896 17925856 5% // dev/sda9 203727156 93089700 100121712 49%/opt/dev/sda8 4956284 570104 4130348 13%/var/dev/sda6 19840892 1977568 16839184 11%/usr/dev/sda3 988116 23880 913232 3%/boot description: example 4: List the I node usage of each file system command: df-ia output: [root @ CT1190 log] # df-ia file system Inode (I) used (I) available (I) % mount point/dev/sda7 5124480 5560 5118920 1%/proc 0 0 0-/procsysfs 0 0 0-/sysdevpts 0 0 0 0-/dev/pts/dev/sda9 5 2592640 50519 52542121 1%/opt/dev/sda8 1280000 8799 1271201 1%/var/dev/sda6 5124480 80163 5044317 2%/usr/dev/sda3 255232 34 255198 1%/boottmpfs 4118303 1 4118302 1% /dev/shmnone 0 0 0-/proc/sys/fs/binfmt_misc description: instance 5: list file system type commands: df-T output: root @ CT1190 log] # df-T file system type 1 K-block used available % mount point/dev/sda7 ext3 19840892 890896 17925856 5%/dev/sda9 ext3 203727156 93175692 100035720 49%/opt/dev/sda8 ext3 4956284 570104 4130348 13%/var/dev/sda6 ext3 19840892 1977568 16839184 11%/usr/dev/sda3 ext3 988116 23880 913232 3%/boottmpfs tmpfs 16473212 0 16473212 0%/dev/shm description: instance 6: display the current disk space and usage more easily. Command: output: [root @ CT1190 log] # df-H file system capacity in use available % mount point/dev/sda7 19G 871 M 18G 5%/dev/sda9 195G 89G 96G 49%/opt/dev/sda8 4.8G 557 M 4.0G 13%/var/dev/sda6 19G 1.9G 17G 11%/usr/dev/sda3 965 M 24 M 892 M 3%/boot Tmpfs 16G 0 16G 0%/dev/shm [root @ CT1190 log] # df-H file system capacity in use available % mount point/dev/sda7 21G 913 M 19G 5% // dev/sda9 209G 96G 103G 49%/opt/dev/sda8 5.1G 584 M 4.3G 13%/var/dev/sda6 21G 2.1G 18G 11%/ usr/dev/sda3 1.1G 25 M 936 M 3%/boottmpfs 17G 0 17G 0%/dev/shm [root @ CT1190 log] # df-lh file system capacity used available % mount point/dev/sda7 19G 871 M 18G 5%/dev/sda9 195G 89G 96G 49%/opt/dev/sda8 4.8G 557 M 4.0G 13%/ var/dev/sda6 19G 1.9G 17G 11%/usr/dev/sda3 965 M 24 M 892 M 3%/boottmpfs 16G 0 16G 0%/dev/shm [root @ CT1190 log] # df -k file system 1 K-block used available % mount point/dev/sda7 19840892 890896 17925856 5%/dev/sda9 203727156 93292572 99918840 49%/opt/dev/sda8 4956284 570188 4130264 13%/var/dev/sda6 19840892 1977568 16839184 11%/usr/dev/sda3 988116 23880 913232 3%/boottmpfs 16473212 0 16473212 0%/dev/shm description: -h displays more current disk space and usage in a more readable manner The-H Parameter in-h root is the same, but in root mode, use 1000 instead of 1024 for capacity conversion-k to display disk usage in units-l to display disk space usage of local partitions. If the server nfs has a remote server disk, after-l is added to df, the system displays the result-I after filtering the nsf drive to display inode usage. Linux uses a pointer-like method to manage disk space shadows. This is also a key application.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.