From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 111c93,a4058c37c8deaaa3 X-Google-Attributes: gid111c93,public From: Robert Harley Subject: Re: How can I change year 2018 to 1998 Date: 1998/10/19 Message-ID: #1/1 X-Deja-AN: 402761479 Content-Transfer-Encoding: 8bit References: <6vvjk0$t70$1@news.kjist.ac.kr> <707r55$qec$1@pulp.ucs.ualberta.ca> Content-Type: text/plain; charset=iso-8859-1 Organization: I.N.R.I.A Rocquencourt Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha michal@gortel.phys.ualberta.ca (Michal Jaegermann) writes: > [...chyear.c...] > 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. As far as I can remember, I originally had lstat(), but since utime() seems to always follow links I switched to stat() for consistency. So 'chyear' follows links. That's a feature! ;-) > If you do not care about dates on links then 'touch' will work > equally well without writing any C and compiling anything. No way Jos�. The whole point is to move bunches of files from the future back to the past without messing up the order of their time stamps relative to one another. If you care about versioning, makefiles or just want to know "which version of that project is the most recent?", it's best not to throw away all timestamp information with 'touch'. IMHO. Bye, Rob.