[svlug] Re: [svlug]Re: how to copy a bunch of "." files?

Walter Reed walt at hubinternet.com
Sat Apr 29 10:26:59 PDT 2000


On Fri, Apr 28, 2000 at 05:35:05PM -0700, Marc Merlin wrote:
> On jeu, avr 27, 2000 at 11:04:01 -0400, Bryan -TheBS- Smith wrote:
> > On Thu, 27 Apr 2000, Ian B MacLure wrote:
> > > To copy the entire directory hierarchy below your PWD
> > > cd to the directory you want to copy FROM
> > > 
> > > find . -print | cpio -dmpv <TO-DIRECTORY-PATH>
> > 
> > Learn this by heart and you will be a successful UNIX admin. 
> > Copiest everything exact, all files, all permissions.
> 
> Why bother?
> cp -a source dest
> 
> It's just like the tar cf - | (cd dest; tar xvf -), it's really useless when
> you have GNU cp.

True, but because it's only GNU, so it's not portable. If you routinely work
on a mix of systems, it's good to learn the other method.

As a mini rant, I sure wish Solaris, HPUX, AIX, etc would use the GNU tools.
It would make life SO much easier. I mean, Solaris has this broken tar that
has NEVER been fixed, doesn't support compression, etc. The comercial unixes
have no excuse to ship the garbage they do. When I setup a solaris box
for example, I do install the GNU tools, but in /usr/local/bin. The root
account has this at the end of it's path, because some systems scripts break
when encountering a superior GNU replacement command.






More information about the svlug mailing list