Linux controls the file deletion by the number of links. This file will be deleted only when there is no link in a file. In general, each file has two link counters: i_count and i_nlink. The meaning of i_count is the number of current file consumers (or called). The meaning of i_nlink is the number of media connections (the number of hard links); it can be understood that i_count is the memory reference counter, and i_nlink is the reference counter of the disk. When a file is referenced by a process, the corresponding i_count number will increase; when a hard link to the file is created, the corresponding i_nlink number will increase. For the delete command rm, the actual reduction of the disk reference count i_nlink. There will be a problem here. If a file is being called by a process and the user performs an rm operation to delete the file, what happens? After the user performs the rm operation to delete the file, and then executes ls or other file management commands, the file cannot be found again, but the process of calling the deleted file continues to execute normally, and can still read and write correctly from the file. Into the content. This is why? This is because the rm operation only reduces the i_nlink of the file. If there is no other link i_nlink, it is 0; but since the file is still referenced by the process, the i_count corresponding to the file is not 0, so even if rm is executed Operation, but the system does not actually delete this file, when only i_nlink and i_count are 0, the file will be deleted. In other words, you also need to undo the process's call to the file. The above mentioned i_nlink and i_count are the real conditions for file deletion, but when the file is not called, can you still retrieve the deleted file after executing the rm operation to delete the file? As mentioned earlier, the rm operation only reduces the i_nlink of the file, or sets it to 0. The actual link is to delete the file name to the inode. At this time, there is no entity that deletes the file (block data block). If the machine is stopped in time, the data can be retrieved. If the data is continuously written at this time, then the new data may be allocated to the block data block of the deleted data. At this time, the file will be real. Recycling, there is no way for the gods at that time
The missing header file ‘security/pam_modules.h’ is part of the libpam development, a P
A.Linux files can be divided into four types: ordinary files, directory files, link files, and devi
For beginners, the learning of Linux commands is not so simple. Many beginners rarely use commands o
Linux kernel is very stable, but it is still inevitable to encounter a crash, get the memory image w
Linux RAC OCFS file system and INODES
Research and transplantation of MiniGUI in embedded Linux environment
Establishing GPRS wireless Modem dialing method under Linux system
How to install rpm package for Linux system
Practical Tips: Several Ways to Remove Grub from Linux Systems
Linux cache memory Cache Memory detailed
Shell awk real-time monitoring network card traffic script (common application 2)
Memcache installation under Linux (with libevent installation) Tutorial
Neighbor subsystem of linux protocol stack (related process 3)
How to set up the keypad when the computer is turned on
How to do Win10 TH2 update failure
How to upgrade win7 system win10
Windows XP system startup speed question and answer question
Custom Thunder file suffix Reduce software check time
Solving the problem that BT download cannot be continued due to the disappearance of seeds.
Windows Insider preview version how to turn into Win10 official version of the Raiders
Pirated Windows7 CD appeared in Zhongguancun merchants said that the sales volume is very good