One linux Command every day (34): du 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 detail (33): df command http://www.bkjia.com/ OS /201212/174434.html Linux du command is also to view the use space, but what is different from the df command is that the Linux du command is used to view the space used by files and directory disks, or there are some differences with the df command. 1. command Format: www.2cto.com du [Option] [file] 2. command function: displays the disk space used by each file and directory. 3. Command Parameters:-a or-all displays the size of individual files in the directory. -B or-bytes: displays the size of directories or files in bytes. -C or -- total not only displays the size of individual directories or files, but also the total number of all directories or files. -K or -- kilobytes is output in KB (1024 bytes. -M or -- megabytes is output in MB. -S or -- summarize only displays the total, and only lists the last added total value. -H or -- human-readable is in the unit of K, M, and G to improve information readability. -X or -- one-file-xystem is based on the file system at the beginning of processing. If it encounters a different file system directory, it is skipped. Www.2cto.com-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 in hours without the size of their subdirectories. -X <File> or -- exclude-from = <File> specifies the 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-h, but K, M, and G are measured in 1000 units. -L or -- count-links repeat the hardware link file. 4. use instance: instance 1: Display directory or space occupied by files command: du output: [root @ localhost test] # du608. /test6308. /test44. /scf/lib4. /scf/service/deploy/product4. /scf/service/deploy/info12. /scf/service/deploy16. /scf/service4. /scf/doc4. /scf/bin32. /scf8. /test31288. [root @ localhost test] # Note: only the directory size of the subdirectories under the current directory and the total size of the current directory are displayed. The bottom 1288 is the total size of the current directory instance 2: command: du log2012.log output: [root @ localhost test] # du log2012.log 300 log2012.log [root @ local Host test] # Description: www.2cto.com instance 3: view the space occupied by the specified directory. Command: du scf output: [root @ localhost test] # du scf4 scf/lib4 scf/service/deploy/product4 scf/service/deploy/info12 scf/service/deploy16 scf/service4 scf/doc4 scf/bin32 scf [root @ localhost test] # description: example 4: run the command to display space occupied by multiple files: du log30.tar.gz log31.tar.gz output: [root @ localhost test] # du log30.tar.gz log31.tar.gz 4 log30.tar.gz 4 logs [root @ localhost test] # description: instance 5: only show the total size command: du -S output: [root @ localhost test] # du-s1288. [root @ localhost test] # du-s scf32 scf [root @ localhost test] # cd .. [root @ localhost soft] # du-s test1288 test [root @ localhost soft] # Note: instance 6: easy-to-read format display command: du-h test output: [root @ localhost soft] # du-h test608K test/test6308K test/test44.0K test/scf/lib4.0K test/scf/service/deploy/product4.0K test/scf/service/deploy/info12K test/scf/service/deploy16K test/scf/service4. 0 K test/scf/doc4.0K test/scf/bin32K test/scf8.0K test/test31.3M test [root @ localhost soft] # Note: instance 7: commands are displayed for files and directories: output: [root @ localhost soft] # du-ah test4.0K test/log31.tar.gz 4.0 K test/test13.tar.gz 0 test/linklog. log0 test/test6/log2014.log300K test/test6/linklog. log0 test/test6/log2015.log4.0K test/test6/log2013.log300K test/test6/log2012.log0 test/test6/log2017.log0 test/test6/log2016.log608K test/test6 0 test/log2015.log0 test/test4/log2014.log4.0K test/test4/log2013.log300K test/test4/container test/test44.0K test/scf/lib4.0K test/scf/service/deploy/product4.0K test/scf/ service/deploy/info12K test/scf/service/deploy16K test/scf/service4.0K test/scf/doc4.0K test/scf/bin32K test/scf4.0K test/log2013.log300K test/log2012.log0 test/log2017.log0 test /log2016.log4.0K test/log30.tar.gz 4.0 kb test/ Log.tar.bz2 4.0 K test/log.tar.gz 0 test/test3/log2014.log4.0K test/test3/log2013.log8.0K test/test341_k test/scf.tar.gz 1.3 M test [root @ localhost soft] # Note: instance 8: display the size of the disk space occupied by several files or directories, and calculate their total command: du-c log30.tar.gz log31.tar.gz output: [root @ localhost test] # du-c log30.tar.gz log31.tar.gz 4 log30.tar.gz 4 log31.tar.gz 8 total [root @ localhost test] # Note: After the-c option is added, du not only shows the size of disk space occupied by the two directories, but also calculates the sum of these two directories in the last row. Instance 9: sort by space SIZE command: du | sort-nr | more output: [root @ localhost test] # du | sort-nr | more1288. 608. /test6308. /test432. /scf16. /scf/service12. /scf/service/deploy8. /test34. /scf/service/deploy/product4. /scf/service/deploy/info4. /scf/lib4. /scf/doc4. /scf/bin [root @ localhost test] # Note: instance 10: output the space command used by each subdirectory in the current directory: du-h -- max-depth = 1 output: [root @ localhost test] # du-h -- max-depth = 1608 K. /test6308K. /test432K. /scf8.0K. /test31.3M. [root @ localhost test] #