From: Robert Harley <harley@corton.inria.fr>
Subject: Re: 20 year problem with Alpha
Date: 1998/07/24 [thread overview]
Message-ID: <rz7n29zdkgf.fsf@corton.inria.fr> (raw)
In-Reply-To: y6u347z3vb.fsf@tweedledumb.cygnus.com
Craig Burley <burley@tweedledumb.cygnus.com> writes:
> I haven't bothered to find a solution to the problem of fixing
> the dates on symbolic links. It surprises me that GNU `touch'
> doesn't offer a --no-dereference option for this, but perhaps
> there's no way to do it in UNIX anyway [...]
You can read the access/modify/change date and time using stat() or
lstat() depending on whether you want to follow links or not. You can
write the access/modify date and time using utime() but you can't set
the change time to anything other than "now" nor choose not to follow links.
As far as I know.
:(
I wrote a wee program called 'chyear' for changing access or modify years.
You can do summat like this (in tcsh):
foreach file ( `find . -mtime -0 -print` )
chyear -m $file 2018 1998
end
which changes anything with a modify time in 2018 to 1998 (if you have
permission to change it).
Anyone want?
Rob.
PS: Ah, I love the smell of nap^H^H^HUnix in the morning!
next prev parent reply other threads:[~1998-07-24 4:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-07-23 4:00 20 year problem with Alpha Torsten Bauer
1998-07-24 4:00 ` Craig Burley
1998-07-24 4:00 ` Robert Harley [this message]
1998-07-25 4:00 ` Craig Burley
1998-07-24 4:00 ` John Walstra
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox