Changing file contents without changing time.

Changing file contents without changing time.

Post by Deepak Go » Sun, 02 Feb 1992 06:45:55



Is it possible to change the contents of a file without
changing it's time stamp.

Thanks in advance to everyone.

Deepak

 
 
 

Changing file contents without changing time.

Post by Rich Bra » Wed, 05 Feb 1992 07:55:29



>Is it possible to change the contents of a file without
>changing it's time stamp.

Sure, use the stat() system call to find out the current modification
time, then modify the file, and then use the utime() call to set the
modification time back to the previously-retrieved value.

-rich

 
 
 

Changing file contents without changing time.

Post by Jose A. Vela » Sun, 09 Feb 1992 04:02:56


 What about the creation time of the file ??

 It is posible to change it ?

 _____________________________________________________________________________
 Jose Angel Vela Avila.
  Instituto Tecnologico y de Estudios Superiores de Monterrey
    I.T.E.S.M
  Mexico.
  ___               _    ___  _         __



<_/

 
 
 

Changing file contents without changing time.

Post by Tom Christianse » Sun, 09 Feb 1992 04:44:39



: What about the creation time of the file ??
: It is posible to change it ?

There's no such thing to change.  See the stat(2) man page for
what's really stored in the inode.

--tom