[TriLUG] Moving a subdirectory tree

Benjamin Reed ranger at befunk.com
Sun Feb 3 19:21:58 EST 2002


Tom Bryan [tbryan at python.net] wrote:
> Actually, both commands below preserve timestamps for files and directories.  
> Neither one seems to preserve the timestamps for symlinks, and I can't get 
> touch to operate on the symlink.  When I touch the symlink with an explicit 
> time, it updates the target of the link.  For example, 
> 
> $ ll
> total 0
> -rw-rw-r--    1 tbryan   tbryan          0 Feb  3 20:21 bg
> lrwxrwxrwx    1 tbryan   tbryan          2 Feb  3 20:12 bg_BG -> bg
> $ touch -r /usr/share/scrollkeeper/Templates/bg_BG bg_BG
> $ ll
> total 0
> -rw-rw-r--    1 tbryan   tbryan          0 Jan  1 12:23 bg
> lrwxrwxrwx    1 tbryan   tbryan          2 Feb  3 20:12 bg_BG -> bg
> 
> Is there a way to update a symlink's access and modification times?

If you go back to the tar-copy method, do a 'tar --help' or 'man tar'.
There are options to (GNU) tar that have it preserve permissions and
timestamps.

-- 
Ben Reed a.k.a. Ranger Rick (ranger at befunk.com)
http://defiance.dyndns.org/ / http://radio.scenespot.org/
Frankenstein was the creator -- not the monster.  It's a common
misconception, held by all truly stupid people. -- Kryten



More information about the TriLUG mailing list