From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,a4058c37c8deaaa3 X-Google-Attributes: gid111c93,public From: michal@gortel.phys.ualberta.ca (Michal Jaegermann) Subject: Re: How can I change year 2018 to 1998 Date: 1998/10/16 Message-ID: <707r55$qec$1@pulp.ucs.ualberta.ca>#1/1 X-Deja-AN: 401834188 References: <6vvjk0$t70$1@news.kjist.ac.kr> Organization: Disorganized Bits Reply-To: michal@gortel.phys.ualberta.ca Newsgroups: comp.os.linux.alpha Robert Harley (harley@corton.inria.fr) wrote: : > How can I fix this? The month and day are all right. : I wrote a tiny program called "chyear": Unfortunately it has two problems. One - it is using 'stat' instead of 'lstat' so it will dereference symbolic links. Two - even if you will look at a link and not an underlying inode then 'utime' seems to follow links as well. Sigh! Frankly, I do not know if the later is a required behaviour or bug in glibc. Manpage seem to suggest a bug; it does not say anything about links but talks in terms of inodes. If you do not care about dates on links then 'touch' will work equally well without writing any C and compiling anything. Type 'touch --help' to see for yourself. :-) It will even do multiple files in one go instead of walking them one-by-one. Michal