Next | What's a file? | 24 |
When the link count reaches 0, the file data is scrubbed
Well, not quite
The kernel also has a table of the number of processes that have the inode open
The file isn't destroyed until this count reaches 0 also
Why?
So that this works:
% long_running_process < data & % rm data
The data file remains until the long-running process exits
Even though it no longer has a name in the filesystem
Next | Copyright © 2007 M. J. Dominus |