Tag:code inux number linu Connection Options ota system newline
du [-ABCDHHKLMSSX] [-l < Sign connection >][-x < files >][--block-size][--exclude=< directories or files;] [--max-depth=< directory Layer >][--help][--version][directory or file] Common parameters:-A or-all displays disk usage for each specified file, or displays the respective disk usage for each file in the directory-B or-bytes displays the directory or file size, in bytes -C or –total in addition to displaying the size of a directory or file, and also displaying the sum of all directories or files-D or –dereference-args displays the source file size of the specified symbol connection-h or –human-readable in k,m,g for improved readability of the information -H or –si is the same as the-h parameter, but the k,m,g is a file that is converted in 1000 instead of 1024 for the conversion unit-K or –kilobytes in the bytes Unit-L or –count-links to repeat the hardware-connected files-l< Symbol connection > or –dereference< symbol connection > Display options Specify the source file size of the symbolic connection-M or –megabytes in 1MB-S or –summarize show totals only, that is, the size of the current directory-S or –separ Ate-dirs the size of each directory does not include the size of its subdirectories-X or –one-file-xystem to the file system at the beginning of processing, if the other different file system directories are skipped-x< file > or –exclude-from= < file > in < file > specify directory or file –exclude=< directory or File > skip the specified directory or file –max-depth=< directory layer > exceed the specified number of levels of the directory, to be ignored help display Help Help –version display version information. 1. Displays the disk usage for a directory tree and each subtree du/home/linux shows the number of disk blocks 2 in the/home/linux directory and in each subdirectory. Displays the disk usage of a directory tree and each of its subtrees in 1024-byte du-k/home/linux shows the number of 1024-byte disk blocks in the/home/linux directory and each of its subdirectories 3. Displays the disk usage of a tree and each of its subtrees in megabytes du-m/home/linux in/ The Home/linux directory and each of its subdirectories shows the number of MB disk blocks 4. Displays the disk usage of one directory tree and each subtree in gigabytes du-g/home/linux in/home/ The number of GB disk blocks is displayed in the Linux directory and in each subdirectory. 5. View the size of all directories and subdirectories in the current directory: du-h . "." Represents the current directory. can also be replaced by a clear path -h represents the human form of K, M, G display 6. Look at the size of the user directory under the current directory, and do not want to see other directories and their subdirectories: du-sh user -s means the summary, That is, only one summary value is listed du-h--max-depth=0 user --max-depth=n means only deep into the nth-level directory, set here to 0, which means not to go deep into subdirectory 7. Lists the size of all directories and files under the user directory and its subdirectories: du-ah user -a means including directories and files 8. The size of the directory that lists the directory names in the current directory that do not include the XYZ string: du-h--exclude= ' * xyz* ' 9. Want to get more information about the user directory and the subdirectory size on one screen: du-0h user -0 (bar 0) represents information for each directory listed, without wrapping, but directly outputting the information for the next directory. &NBSP;10. Show all disk usage for only one directory tree du-s/home/linux 11. View each folder size: Du-h--max-depth=1 View the specified directory:/path represents Path
du -h --max-depth=1 /path
Linux View each folder size command du-h--max-depth=1