Linux df command using instance summary

  
                

Knowing the Linux commands know that the df command can view the space of the Linux disk. This article will give you a detailed introduction to the specific usage of the df command through an example, so that you have an understanding.

Linux du command also see the use of space, but with a different command df is Linux du command is the disk space the files and directories used to view, and still there are some differences df command

1. Command format:

du [options][file]

2. Command function:

Display the disk usage space of each file and directory (see the system's eight ways to view Linux disk space).

3. Command parameters:

-a or -all Displays the size of individual files in the directory.

-b or -bytes Displays the directory or file size in bytes.

-c or --total In addition to displaying the size of individual directories or files, it also displays the sum of all directories or files.

-k or --kilobytes Output in KB (1024bytes).

-m or --megabytes Output in MB.

-s or --summarize displays only totals, only the last totaled values.

-h or --human-readable Improves the readability of information in units of K, M, and G.

-x or --one-file-xystem is based on the file system at the beginning of the process, skipped if it encounters a different file system directory.

-L "Symbolic Link" or --dereference "Symbolic Link" Shows the source file size of the symbolic link specified in the option.

-S or --separate-dirs Displays the size of individual directories without the size of their subdirectories.

-X "File" or --exclude-from= "File" Specify a directory or file in "File".

--exclude=“Directory or File” Skips the specified directory or file.

-D or --dereference-args Displays the source file size of the specified symbolic link.

-H or --si is the same as the -h parameter, but K, M, and G are in units of 1000.

-l or --count-links Duplicate calculation of hardware linked files.

4. Example:

Example 1: Displaying the space occupied by a directory or file

Command: du

Output:

The code is as follows:

[root@localhost test]# du

608 . /test6

308 . /test4

4 . /scf/lib

4 . /scf/service/deploy/product

4 . /scf/service/deploy/info

12 . /scf/service/deploy

16 . /scf/service

4 . /scf/doc

4 . /scf/bin

32 . /scf

8 . /test3

1288 .

[root@localhost test]#
Previous1234Next page Total 4 pages

Copyright © Windows knowledge All Rights Reserved