[SunHELP] cp -r & symlinks


Tue Nov 12 11:50:57 CST 2002


have you dealt with any tar: * cannot create errors or cannot set time when
using that method?
its almost as it its trying to use the cdrom as a temporary stage point on
my end... 

-----Original Message-----
From: Dale Ghent [mailto:daleg at elemental.org]
Sent: Wednesday, October 09, 2002 1:23 AM
To: Markham, Richard
Cc: Sunhelp (E-mail)
Subject: Re: [SunHELP] cp -r & symlinks


On Fri, 4 Oct 2002, Markham, Richard wrote:

| It appears that cp -r /cdrom/* will recurse through the cdrom0
| symlink as well as the directory it points to as well.  I did
| a seperate test by doing a cp -r /cdrom/cdrom0, hoping it would
| only copy the link and not follow it, but it copied the target as
| well.  Is there anyway I can get cp to recurse without following
| symlinks?

No. Use tar instead.

tar cf - /cdrom | (cd /destination && tar xf -)

/dale



More information about the SunHELP mailing list