[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using the cp command.



alex wrote:
> I'm trying to copy the contents of one partition to another with:
>         cp -afv  (partition a)/*  (partition b)/
> [...]
> Is there a way to copy the entire contents of one partition  to another  
> partition that contains duplicates  without having to bang on y for each 
> duplicate----different options, for example?
> I checked out ' man cp' but don't see anything that might help.  Perhaps 
> there's a different way of doing the copy.

I really like using rsync for this.

  rsync -a (partition a)/*  (partition b)/

Or, since I have usually mounted the new disk under the old one and
need to prevent the recursion, the following:

  mkdir /new
  mount /dev/whatever /new
  rsync -a --exclude /new / /new/

Bob

Attachment: pgpaoAn3Ih0y6.pgp
Description: PGP signature


Reply to: