On the du command of Linux

Source: Internet
Author: User

**du (disk usage), as the name implies, view the size of the directory/file footprint * *





1. View the size of all directories and subdirectories in the current directory

Du-h

Du-ah

#-h: Using the human form of K, M and G to display
#-a: Displaying directories and files



du-h tmp

Du-ah tmp

size of #只查看当前目录下的tmp目录 (including subdirectories)


2. View the size of the current directory and its specified depth directory

du-h–-max-depth=0

#-–max-depth=n: Drill down to the nth-level directory, set here to 0, which means not to go deep into subdirectories





Some common parameters of the 3.DU command:

-A or-all displays the size of individual files in the directory

- B or-bytes when displaying a directory or file size, in bytes
- C or--total displays the sum of all directories or files in addition to the size of individual directories or files

-D or--dereference-args displays the source file size for the specified symbolic connection

- h or--human-readable to improve readability of the information in k,m,g units

-K or--kilobytes in 1024x768 bytes units

-L or--count-links repeatedly compute hardware-attached files

The source file size of the symbol connection specified in the-L or--dereference display option

-M or--megabytes in 1MB units

- s or--summarize show totals only

- s or--separate-dirs displays the size of individual directories without the size of their subdirectories

-x< File > or--exclude-from=< file >

--exclude=< directory or File > skip the specified directory or file

--max-depth=< the directory layer > exceeds the specified number of layers, it is ignored


On the du command of Linux

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.