01-24-07 12:47 PM
In article <1169519225.380744.274580@a75g2000cwd.googlegroups.com>,
mark_doherty@yahoo.co.uk wrote:
> We are having problems with 'date' on our CX/UX version 7.1
> Basically files created by 'cp' are 1 year old, whereas 'touch' creates
> the file with the correct date.
>
> Notice below that a has todays date, but b and sh.log are 1 year old!
Are you using a fileserver? It looks to me like the date on the server
is wrong. When you use "touch", it forcibly sets the modification time
to the current time on the client. When you write to a file, the server
sets the modification time using its clock.
>
> Any ideas
>
> #! /bin/ksh
> rm a b
> date > sh.log
> touch a
> cp a b
> ls -l >> sh.log
> date >> sh.log
>
> more sh.log
>
> Tue Jan 23 02:10:36 GMT 2007
> total 4
> -rw-rw-r-- 1 flt d61flt 0 Jan 23 02:10 a
> -rwxrwxrwx 1 flt d61flt 72 Jan 23 2006 a.sh
> -rw-rw-r-- 1 flt d61flt 0 Jan 23 2006 b
> -rw-rw-r-- 1 flt d61flt 29 Jan 23 2006 sh.log
> Tue Jan 23 02:10:36 GMT 2007
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
[ Post a follow-up to this message ]
|