[olug] Unix Tip: KEEPING THE TIME

Eric Pierce eric_olug at yahoo.com
Wed Jan 1 19:03:13 UTC 2003


And there's always the naughty way.

$ ls -l my_file.vim 
-rw-r--r--    1 boo      users           0 2003-01-01
12:59 my_file.vim
$ touch -t 199910311611 my_file.vim
$ ls -l my_file.vim 
-rw-r--r--    1 boo      users           0 1999-10-31
16:11 my_file.vim

--- Unix Guru Universe <listserv at ugu.com> wrote:
> 
>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> 
> 			      UNIX GURU UNIVERSE 
> 			         UNIX HOT TIP
> 
> 			Unix Tip 2191 - December 31, 2002
> 
> 		    http://www.ugu.com/sui/ugu/show?tip.today
> 
>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> 
> 
> KEEPING THE TIME
> 
> Keep the time modified 
> of the original file
> 
> You can keep the time 
> modified of the original 
> file when editing it. That 
> way, if you back out of 
> your changes, you can 
> restore the original file 
> as if nothing happened.
> 
> Let's say we're editing 
> foo.conf
> 
> $ mv foo.conf foo.conf.orig
> $ cp foo.conf.orig foo.conf
> $ vi foo.conf
> 
> If you hsve to restore the 
> original file: 
> 
> $ mv foo.conf.orig foo.conf
> 
> and the file has the original mtime.
> 
> Louis Bertrand
> Durham College


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the OLUG mailing list