Re: Making tar not change ctime or atime
From: http://packetstorm.linuxsecurity.com/filedesc/touch2.c.html
"Touch2 is a utility which modifies the ctime. Touch(1) can be used to
change the last-access & last-modification times on the files (or
directories) you read or modify, but doing this will change the
last-inode-change time to the current time. Touch2 can be run after
touch(1) or other commands."
Drew Daniels
On Fri, 26 Jul 2002, Derrick 'dman' Hudson wrote:
> On Thu, Jul 25, 2002 at 12:33:25PM -0400, Mike Dresser wrote:
> | On Thu, 25 Jul 2002, Sean 'Shaleh' Perry wrote:
> |
> | > The field st_ctime is changed by writing or by setting
> | > inode information (i.e., owner, group, link count, mode,
> | > etc.).
> | >
> | > so simply doing a chmod will set ctime.
> |
> | I want tar to NOT change the ctime :)
>
> Then don't change the inode. That is, don't run tar or chmod or touch
> or anything else that will change the inode.
>
>
> Going back to the original post :
>
> I can get tar to not change the atime on a backup with the
> --atime-preserve flag.
>
> However, that makes it change the ctime, to do that.
>
> Indeed, setting the atime field requires changing the inode. Hence
> ctime is changed.
>
> The manpage shaleh quoted is stat(2). Another section of it says :
> time_t st_ctime; /* time of last change */
>
> You can't control it, which is a Good Thing.
>
> -D
>
> --
> Your beauty should not come from outward adornment, such as braided hair
> and the wearing of gold jewelry and fine clothes. Instead, it should be
> that of your inner self, the unfading beauty of a gentle and quiet
> spirit, which is of GREAT WORTH in God's sight. For this is the way the
> holy women of the past used to make themselves beautiful.
> I Peter 3:3-5
>
> http://dman.ddts.net/~dman/
>
--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: