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

Ian B MacLure imaclure at mail.arc.nasa.gov
Mon May 1 08:51:57 PDT 2000


>Date: Fri, 28 Apr 2000 17:35:05 -0700
>From: Marc Merlin <marc_news at valinux.com>

	[SNIP]

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.

	Assuming of course that GNU enabled machines are all that one
	deals with. Out here in the world this is not (sigh...) something
	that can be assumed.
	In short, the "find" method works anytime, anywhere on any *X
	OS I've ever encountered ( which admittedly doesn't include HPUX
	but I'll wager it'll work there too )

	[SNIP]

	IBM

-
################ No Times Like The Maritimes, Eh! ##########################
# IBM   aka          #   imaclure at mail.arc.nasa.gov 
(Eudora/POP3)            (desk)          #
# Ian B MacLure  #    maclure at cvsrf.arc.nasa.gov 
(currently)   #
# Sr Engineer / MSEC / Nasa Ames Research Center / Moffett Field, CA 
#
# Voice: (650)604-0667     Fax: (650)964-4195     Secretary: 
(650)604-6737                 #
#####################################################################





More information about the svlug mailing list