Re: mv command wierdness. (error in VFS?)

Tom Eastep (eastep@loc1.tandem.com)
Thu, 17 Dec 1998 21:15:33 +0000


Khimenko Victor wrote:
>
> 17-Dec-98 16:09 you wrote:
> > Just recently I have noticed a quite interresting thing:
>
> > I have just moved an backup version of a file in an compilation tree
> > over the orignal:
>
> > mv backup.c~ backup.c
>
> > That's nothing special of course. However the interresting thing
> > was that make didn't notice this at all. In esp. it didnt notice this
> > as a change to backup.c and didn't therefore any recompilation work.
> > I would suspect that in this case the modification time of the
> > inode corresponding to backup.c~ didn't get updated.
>
> Why ? backup.c~ (or now backup.c) is not changed -- why modification time
> should be changed ??? At least I'm always was sure that this is exactly correct
> behaviour (I'm depend on it a lot :-) but unfortunatelly I'm not know what
> POSIX say on subject...

Assuming that mv used rename(2), POSIX says that only the parent
directory's ctime and mtime should have been updated.

-Tom

-- 
Tom Eastep
Compaq Computer Corporation
Enterprise Computing Group
Tandem Division
tom.eastep@compaq.com

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/