Linux statistics folder space usage-basic usage of the du command, linux-du
In the command line environment, you need to know the space occupied by a folder in the linux System and the files it contains. The command du provided by linux can meet the requirements well.
I will not write out other usage items one by one, but I think it will be the most useful, direc
Common commands for Linux O M: du and Common commands for linux: duThe commonly used du-sh * Linux du command is also used to view the space, but unlike the df command, the Linux du command is used to view the space used by files and directory disks, there are some differences with df commands.1. Command Format:Du [Op
The du command is a view of the space used by files and directory disks.(1) Usage:usage: du [options] [file](2) Function:function: report disk space usage(3) Option parameters:1)-A--all displays statistics on all files, not just subdirectories.2)-B--bytes outputs the size in bytes, overriding the default 1024-byte count unit.3)-H--human-readable with K,m,g as the unit, improve the readability of the informa
Du-ah--max-depth=1 This is what I want the result of a means displays all files and folders (without subdirectories) in the directory, and H represents the depth of the directory in a way that humans can understand. max-depth. The du command is used to view the size of the disk space occupied by a directory or file. Common option combinations are: Du-shone,
Du-ah--max-depth=1 This is what I want. A indicates that all files and folders (without subdirectories) are displayed in the directory, and H represents the depth of the directory in a way that humans can understand, max-depth.The du command is used to view the size of the disk space occupied by a directory or file. Common option combinations are: Du-sh The func
Linux Command Tutorial: view disk space using the du commandThe du command, that is, disk usage, can calculate the disk space occupied by files or directories. Command Format:
Du [Option] [file]Du [OPTION]… [FILE]…If no option is specified, it measures the current working directory and all its subdirectories, displays
Du command
Disk Management
The du command also looks at the usage space, but unlike the DF command, the Linux du command is a view of the space used by files and directory disks, or there are some differences from the DF command.
Grammar
du [Options] [file]
Options
A or-all displays the size of individual files i
1. Df-lh
2. Du-s/usr/* | Sort-rn
This is sorted by byte
3. du-sh/usr/* | Sort-rn
This is sorted by megabytes (M)
4. Select 10 of the preceding
Du-s/usr/* | Sort-rn | Head
5. Select the following 10
Du-s/usr/* | Sort-rn | TailDu-h–-max-depth=0 Userdu-sh–-max-depth=2 | More
Summary
The Linux du command also looks at the use of space, but unlike the DF command, the Linux du command is to see whether the currently specified file or directory (recursively displaying subdirectories) consumes disk space or is somewhat different from the DF command.1. Command format:du [Options] [file]2. Command function:Displays the disk usage space for each file and directory.3. Command parameters:-A or-a
Du and DF[[email protected] samba]# dumpe2fs/dev/sda3|grep "Block size" 4096 bytesThe actual size of the du content, in bytes, added to the statistical file sizeDF occupies space size, in blocks, statistics block usageThe du-s command increments the total number of blocks used by the file system by adding the number of blocks used by all directories, symbolic lin
In linux, the du and df commands also asked me about the command for viewing the directory size in Linux. Now I have learned the commands du/df a while ago. A while ago, some sub-Tests encountered that the program could not be executed due to the full disk space. Therefore, df and du commands were used. View the directory size at www.2cto.com
Command: Du usage linux folder size
du-sh./view current directory size
du-sh * View folder size in current directory
du command
Use
Overview disk usage.
Grammar
Du [a | s] [k] [M] [-g] [-l] [-r] [-X] [-H | l] [File ...]
Description
The
Tags: RSN lan Linu show NTA top LTE difference portsThe du command is used to view the size of the disk space occupied by a directory or file. Common option combinations are: Du-shOne, Du's function: ' Du ' reports the amount of disk space used by the specified files and for each subdirectory (of directory argument s). With no arguments, '
Du-ah--max-depth=1 This is what I want. A indicates that all files and folders (excluding subdirectories) are displayed in the directory, and H means that the max-depth represents the depth of the directory in a way that humans can read.
The du command is used to view the size of the disk space occupied by the directory or file. Common option combinations are: Du
The Linux du command also looks at the usage space, but unlike the DF command, the Linux du command is a view of the space used by files and directory disks, or some difference from the DF command.
What's the difference between Du/bin and Du-s/bin?
-S is summary, showing the sum of space occupied by the directory
Th
DF-HL View disk remaining space
Du-sm folder
Returns the total m of this folder
More features please view:
DF--help
Du--help
Du-sh (the name of this directory) is the size of this directory.
Use the du command to view a directory, such as viewing the/home/kuuyee directory for disk space size you can use the foll
Linux du and df commands
Some people asked me about the command for viewing the directory size in Linux. Now I want to summarize the two commands du/df I learned a while ago. In the past, the df and du commands were used because the program could not be executed due to the full disk space.
View the directory size in du
Linux disk space size statistics du command common usageIn Linux, you can collect statistics on the space occupied by a file or folder. Here we will summarize some common usage as follows:
1. Make statistics on the specified file or folder. The default unit is kbyte (k or kilobytes). In the following example, perform statistics on the testa Folder:[Web @ localhost ~] $ Du-s testa
1589308 testa
2. The corre
Transferred from: http://blog.csdn.net/kmesg/article/details/6570800Today, some classmates asked me to look at the directory size under Linux command, now also will be the former learning to DU/DF two command summary of it.In the pre-test work, we have encountered the DF and du two commands because of the fact that the program cannot be executed due to the full disk space.Du view the directory size, DF to v
In linux, the du and df commands also asked me about the command for viewing the directory size in Linux. now I have learned the commands du/df a while ago. A while ago, during the sub-test, the program could not be executed due to the full disk space. Therefore, the df and du commands were used .... In linux, the du a
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.