[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Deleting a file which is in use



On Tue, Aug 29, 2000 at 09:50:09AM +0530, Kannan wrote:
> Hi,
>    Recently i had an argument with a friend about the superiority of linux
> over NT. He said that linux allows user A to delete a filed when it is being
> used by user B, and that NT does not allow this.
> 
> This is the first time i heard about this so i would like some info on this
> and whether it is a bug or feature

If user A deletes the file and user B has the file open, the file continues
to exist. It really gets deleted at the point when B closes it. 

UNIX uses a reference counting + garbage collection mechanism to clean
up deleted files.

If the app wants to avoid it, it can always use file locking to emulate
NT behavior.

	-Arun