1. Introduction h2>
du for directory size, df for disk usage.
2. du
disk usage
(1) basic function
recursively view the sizes of all files under the folder
(2) common parameters:
-h, — human-readable for size (for example: 1K 234M 2G)
-s, — summarize each parameter in the command column calculated the total amount of
(3) other parameters:
-a, — all output the disk amount of all files, not just the directory
— summary size display surface amount, but not the disk amount; Although the surface usage is usually smaller, it can sometimes become larger due to “holes” between sparse files, internal fragments, blocks that are not directly referenced, and so on.
-b, — block-size=
-b, — bytes = — br>-size =1
-c, — total display total information
-d, The filename ending in NUL in the calculated file F corresponds to the space on the disk. If the value of F is “-“, then the filename read from the standard input
-h is equal to — dereference-args (-d)
-h. The — human-readable sizes are displayed in a readable manner (for example, 1K 234M 2G)
— si similar to -h, but using 1000 as the basis for the calculation instead of 1024
-k is equal to — block-size=1K
-l, — count-links if hard connected, Calculate its size
-m is equal to — block-size=1M
-l, — dereference finds the true destination indicated by any symbolic link
-p, — no-dereference does not follow any symbolic link (default)
-0, — null regards each blank line as 0 bytes instead of a newline
-s, — separate dirs does not include subdirectory occupancy
-s,
-x;
-x;
-x;
-x;
-x;
-x;
-x;
-x;
— exclude=PATTERN files that match the PATTERN described in the specified file
— exclude=PATTERN files that match the PATTERN described in the specified file
— max-depth=N display directory total (used with -all calculation files)
calculates depth N when N is the specified value;
— max-depth=0 equals — summarize
— time summarize
— time=WORD display WORD time, not change time: atime, access, use, ctime or status
— time-style= style display time according to the specified style (same as the “date” command) : FORMAT
full-iso, long-iso, iso, +FORMAT
— help display this help information and exit
— version display version information and exit
3. df
df-hl view disk remaining space
df-h view the partition size of each root path
du-sh [directory name] return the size of the directory
du-sm [folder] return the total number of M of the folder
4. The difference between h2>
du is a file-oriented command that only calculates the space occupied by the file, not the space occupied by the file system metadata.
df is calculated based on the overall file system, and the size of the allocated space in the system is determined by the unallocated space in the file system. The DF command can get how much space is taken up by the hard disk and how much space is left, and it can also show how all file systems are using I nodes and disk blocks.
Read More:
- U disk installation Linux system could not boot, / dev / root does not exist and the identified hard disk space is not available
- How to clean up the disk space of Linux server
- The command Du – h — max depth = 1 in Linux
- Insert datagram error: ISAM error: no free disk space
- Viewing the file system format of disk partition under Linux
- Linux shell gets the file name under the folder
- Error 945 Database cannot be opened due to inaccessible files or insufficient memory or disk space
- Delete files with specified suffix in specified folder under Linux
- Method of modifying file and folder permission by Chmod command in Linux
- Linux view current date and time
- Disk read error solution for new hard disk installation
- Linux use ls to view the file color is all white solution, and Linux file color introduction
- Non system disk or disk error
- Solve the problem of non system disk or disk error, replace and strike any key when ready
- raise ValueError(‘Expected input batch_size ({}) to match target batch_size ({}).‘
- Error:No toolchains found in the NDK toolchains folder for ABI with prefix: mipsel-linux-android
- The computer can’t turn on ERROR: NO BOOT DISK HAS BEEN DETECTED OR THE DISK HAS FAILED
- The out folder does not appear under the idea project. Set the entire compilation information to the target folder
- Copying a param with shape torch. Size ([262, 2048]), parameter size does not match
- Oracle data file space release