Inode operations on files in linux, block changes 1. create a file system and mount it: inode. The block information is as follows: filesystem Inodes IUsed IFree IUse % Mounted on/dev/sdb5 28112 11 28101 1%/test5/dev/sdb6 28112 11 28101 1%/test6Filesystem 1K-blocks Used Available Use % Mounted on/dev/sdb5 108837 5663 97555 6%/test5/dev/sdb6 108865 5663 97581/test62. create a testfile file under/test5: the following information is displayed: filesystem Inodes IUsed IFree IUse % Mounted on/dev/sdb5 28112 12 28100 1%/test5/dev/sdb6 28112 11 28101 1%/test6Filesystem 1K-blocks Used Available Use % Mounted on/dev/sdb5 108837 5664 97554 6%/test5/dev/sdb6 108865 5663 97581 6%/test6 conclusion: when creating a file, it occupies one inode. At least one block3. copy the file testfile from/test5 to/test6/testfile. cpFilesystem Inodes IUsed IFree IUse % Mounted on/dev/sdb5 28112 13 28099 1%/test5/dev/sdb6 28112 12 28100 1%/test6Filesystem 1K-blocks Used Available Use % Mounted on/dev/sdb5 108837 5664 97554 6%/test5/dev/sdb6 108865 5664 97580 6%/test6 conclusion: replication should be equal to the creation process 4. move/test5/testfile to/test6/Filesystem Inodes IUsed IFree IUse % Mounted on/dev/sdb5 28112 12 28100 1%/test5/dev/sdb6 28112 13 28099 1%/test6Filesystem 1K-blocks Used Available use % Mounted on/dev/sdb5 108837 5664 97554 6%/test5/dev/sdb6 108865 5664 97580 6%/test6 conclusion: /test5 inode to reduce one,/test6 inode to add one,/test5 block should remain the same,/test6 should be reduced by a possible cause of file size 5. delete testfileFilesystem Inodes IUsed IFree IUse % Mounted on/dev/sdb5 28112 12 28100 1%/test5/dev/sdb6 28112 12 28100 1%/test6Filesystem 1K-blocks Used Available Use % Mounted on under/test6 /dev/sdb5 108837 5664 97554 6%/test5/dev/sdb6 108865 5664 97580 6%/test6 conclusion: when deleting a file, only inode nodes are deleted, and data in block blocks are not destroyed. This is also the basis for data recovery.