From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,51db6ea6453f12d0 X-Google-Attributes: gid111c93,public From: Robert Harley Subject: Re: 20 year problem with Alpha Date: 1998/07/24 Message-ID: #1/1 X-Deja-AN: 374625772 Content-Transfer-Encoding: 8bit References: <6ySrhLxpz5B@nowhere.hit.handshake.de> Content-Type: text/plain; charset=iso-8859-1 Organization: I.N.R.I.A Rocquencourt Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha Craig Burley 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!