Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Oct 2020 14:17:21 +0100
From:      RW <rwmaillists@googlemail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Preserving target file's creation date
Message-ID:  <20201001141721.5be6318e@gumby.homeunix.com>
In-Reply-To: <20201001134113.13ff6d86.freebsd@edvax.de>
References:  <202010010424.0914OZ9Y029194@sdf.org> <20201001072728.000004b6@seibercom.net> <20201001134113.13ff6d86.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 1 Oct 2020 13:41:13 +0200
Polytropon wrote:


>  So if you want to keep
> all three timestamps identical, you'll have to combine both tasks.

There are four timestamps: atime, mtime, ctime and btime.

The first two are data access and modification. ctime is when the
metadata in the inode was last modified, the 'c' is for changed, not
created.

btime is time the file/inode was created (b for birth), but it's not
portable.

I just had a look at some files I recently copied with dump|restore and
it had preserved all 4 times. I also found:

cp -p preserved atime, mtime and btime.

rsync -a preserved mtime and btime

I find the last two results strange as cp(1) and rsync(1) don't claim
to preserve btime. I'd be surprised if rsync even knows about it. 





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