Horst, if you were serious about it, you could write a program to change the date, touch the file, and change the date again. I'd be surprised if the system time were changed for more than a millisecond.
But yes, that's the best you can do. The ctime is not supposed to be user-settable. I don't think anyone has mentioned the utime() and utimes() system calls. The latter lets you set a file's atime and mtime with microsecond resolution. (How much of that resolution is actually stored depends on the filesystem.) On Wed, Jan 28, 2009 at 2:03 AM, horst <ho...@freeshell.org> wrote: > I don't accept this as an aswer :-) > My question was about arbitrarily changing the ctime of a file, or larger > set of files. Down to the second, to the integer in the file stat structure. > Like with touch with a time argument, or -r referenceFile. > Like with touch and the -a or -m arguments -- I was asking for a -c > argument! > > To achive that manually by changing the system time sounds like playing a > video game, hit-and-miss. Plus other files may get stampd unintentionally > during that period, and log entries may be created. > > - Horst > >> Date: Wed, 28 Jan 2009 00:39:43 -0800 >> From: Alan <eug...@thebucks.net> >> Reply-To: Eugene Unix and Gnu/Linux User Group <euglug@euglug.org> >> To: Eugene Unix and Gnu/Linux User Group <euglug@euglug.org> >> Subject: Re: [Eug-lug] ls script help >> >> Mike Cherba wrote: >>> >>> On Wed, 2009-01-28 at 00:17 -0800, Alan wrote: >>>> >>>> Which apparently doesn't change the ctime on linux. >>>> >>> Yup. Which is why you change the system time. Ccime is maintained by >>> the system for good reasons. >>> >>> >> >> I know I have used a *nix in the past 10 years in which touch could change >> the ctime. A bastardized version of SCO, maybe? >> It's now going to bug me until I figure it out. >> >> -ajb >> _______________________________________________ >> EUGLUG mailing list >> euglug@euglug.org >> http://www.euglug.org/mailman/listinfo/euglug >> > _______________________________________________ > EUGLUG mailing list > euglug@euglug.org > http://www.euglug.org/mailman/listinfo/euglug > -- Bob Miller K<bob> k...@jogger-egg.com _______________________________________________ EUGLUG mailing list euglug@euglug.org http://www.euglug.org/mailman/listinfo/euglug