[TriLUG] Moving a subdirectory tree
Tom Bryan
tbryan at python.net
Sun Feb 3 10:30:14 EST 2002
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?
---Tom
On Sunday 03 February 2002 07:38 pm, Mike Broome wrote:
> "cp -a" worked for me recently. (-a is shorthand for -dpR. It's the -p
> that preserves the timestamps.)
>
> Mike
>
> On Sun, Feb 03, 2002 at 10:21:16AM +0500, Tom Bryan wrote:
> > database happy (not complaining about file permissions and dates). I
> > mounted the new filesystem to /mnt and ran
> >
> > cd /mnt; tar cf - -C /usr/share . | tar xpf - 2> tar.stderr
> >
> > but that doesn't preserve timestamps. Is there a better way to move
> > files from one partition to another?
More information about the TriLUG
mailing list