"Bird Brother Linux private kitchens" disk and file system management summary

df: lists the overall disk usage, file system
du: Check the file system disk usage (commonly used in disk space occupied by the view catalog)

if the direct df is displayed all file systems within the system, with a capacity of 1K listed
df -h people to easily read the G, M, K of the own format
df -i not be displayed in the disk capacity and the number of the inode

Because the data is read almost all major df for the entire file system, so the range is mainly read the information in the super block, so the speed of this command shows soon.

Direct input du, du will display all the directories in the current directory name and capacity, the capacity of the unit is 1K.
Du -a display capacity and names of files and directories in the current directory, the unit 1K
du -s list only the total amount, without listing each individual directory empty capacity.
du -k K lists the capacity to display
du -m M listed in the capacity display
are listed below for each root directory occupied capacity: du -sm / *
a match symbol * On behalf of each directory

Du and df difference is that this command directly into the file system to find all the file data, so sometimes slower.

Hard links and symbolic links: ln

There are two files in Linux on the link below: one is similar to the Windows shortcut files, allowing you to quickly link to the target file or directory is called a symbolic link.
Another: it is through the file system inode link to generate a new file name, instead of generating a new file, called a hard link.
each file occupies a inode, inode file contents from the record to point to.
want to read this document, you must go through the directory
hard links : just add a link to the file name associated with an inode number of records it in a directory.
That has two file name linked to the same inode.

Published 11 original articles · won praise 4 · Views 613

Guess you like

Origin blog.csdn.net/weixin_45626515/article/details/103514894
Recommended