Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Nov 2007 21:33:05 GMT
From:      Joe Peterson <lavajoe@gentoo.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/118249: moving a directory changes its mtime
Message-ID:  <200711252133.lAPLX5iq062255@www.freebsd.org>
Resent-Message-ID: <200711252140.lAPLe1WG087773@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         118249
>Category:       misc
>Synopsis:       moving a directory changes its mtime
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 25 21:40:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Joe Peterson
>Release:        6.2
>Organization:
>Environment:
FreeBSD scorpius 6.2-RELEASE FreeBSD Gentoo 6.2-r3 #3: Thu Oct 25 13:00:32 MDT 2007     joe@scorpius:/usr/src/sys-6.2-r3/i386/compile/GENERIC  i386
>Description:
Moving a directory to a different directory changes its "mtime".  This behavior seems odd compared with other "Unix" systems (tried on Mac OS X and Linux).  Also, moving a file to a different directory does *not* change its mtime, making this behavior inconsistent.  Also, it is not typically desirable to touch mtime simply by being moved, which loses track of the last time the dir's contents were actually changed.
>How-To-Repeat:
mkdir a b
(check timestamps using stat or "ls -ld" and "ls -lcd")
mv b a
(check timestamps again)

Both "a" and "b" will now have new mtime and ctime).  It is expected that "a" will have a new mtime and ctime, but only the ctime on "b" should have changed.
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711252133.lAPLX5iq062255>