Tag: CP RM MV
1. cp and inode
when the file does not exist, assign a new inode number and create a new file;
When a file exists, the inode number takes the inode number of the target file before it is overwritten
650) this.width=650; "src=" Http://www.178linux.com/wp-content/uploads/2017/07/20170721201255_45558.png "style=" font-family: ' Song body ', simsun;font-size:20px;height:auto;vertical-align:middle;border:0px; "/>
2.
rm and inode
release ( inode if inode< Span style= "font-family: ' The song Body '; > is released, the data block is placed in the free space list
650) this.width=650; "src=" Http://www.178linux.com/wp-content/uploads/2017/07/20170721201310_86399.png "style=" font-family: ' Song body ', simsun;font-size:20px;height:auto;vertical-align:middle;border:0px; "/>
3.
mv and inode
If the target and source are in the same file, the new directory entry is created with the new file name, and the old directory bar has the same name, but does not affect the inode number (except the timestamp) or the location of the data on the disk, and the data is not moved.
650) this.width=650; "src=" Http://www.178linux.com/wp-content/uploads/2017/07/20170721201326_15582.png "style=" height:auto;vertical-align:middle;border:0px; "/>
If the target and source are not in the same file, the MV is equivalent to the CP and Rm,inode numbers.
650) this.width=650; "src=" Http://www.178linux.com/wp-content/uploads/2017/07/20170721201341_78890.png "style=" height:auto;vertical-align:middle;border:0px; "/>
The relationship between CP, RM, MV, and Inode in Linux