For a detailed description of the du command parameters see: http://baike.baidu.com/view/43913.htm
The following is only a brief introduction to it;
View the size of the Linux file directory and the number of files that the folder contains
Total statistics Size
Du-sh filename (In fact, we often use du-sh * to display all the files and their sizes in the current directory, if you want to sort them and add them later | SORT-N)
DU-SM * | Sort-n//Statistics The current directory size and sort by size
Du-sk * | Sort-n
Du-sk * | grep filename//View the size of a folder
du-m | Cut-d "/"-F 2//See text before second/character
See how many files are in this folder/*/*/* how many files are there?
Du filename/
Du filename/*/*/* |wc-l
40752
Explain:
WC [-LMW]
Parameter description:
-L: How many lines
-M: How many characters
-W: how many words
Alternatively, you can open the Nautilus Window (folder preferences), click "Edit"-"preferences", switch to "display" tab, change "icon title" under the tree list content is "size, modified date, type." The setting takes effect immediately. The file size is now displayed below the file icon.
Ps:
DF-HL Viewing disk space remaining
Du-sm folder
Returns the total number of M in this folder
More functions View:
DF--help
Du--help
Du--help
Usage: du [options] ... [File] ...
Summarize the disk usage of each < file >, and the total usage of the catalogue.
The parameters that must be used for the long option are also required when using the short option.
-A,--all write counts for all files, not just directories
--apparent-size Print apparent sizes, rather than disk usage; Although
The apparent size is usually smaller
Larger due to holes in (' sparse ') files, internal
Fragmentation, indirect blocks, and the like
-B,--block-size=size use size-byte blocks
-B,--bytes equivalent to '--apparent-size--block-size=1 '
-C,--total produce a grand total
-D,--dereference-args dereference FILEs that is symbolic links
-H like--si, but also evokes a warning; would soon
Change to being equivalent to--dereference-args (-D)
-H,--human-readable print sizes in human readable format (e.g., 1K 234M 2G)
--si like-h, but use powers of 1024
-K like--block-size=1k
-L,--count-links count sizes many times if hard linked
-L,--dereference dereference all symbolic links
-P,--no-dereference don ' t follow any symbolic links (this is the default)
-0,--null end each output line with 0 byte rather than newline
-S,--separate-dirs do not include size of subdirectories
-S,--summarize display only a total for each argument
-X,--one-file-system skip directories on different filesystems
-X FILE,--exclude-from=file exclude files, match any pattern in FILE.
--exclude=pattern exclude files that match PATTERN.
--max-depth=n print the total for a directory (or file, with--all)
If it is N or fewer levels below the command
line argument; --max-depth=0 is the same as
--summarize
--HELP Display this help message and leave
--version display version information and leave
EG:DU-SMH Oracle
54G//Display the Oracle folder size is 54G
Linux View folder size du