The way I duplicate a complete directory structure is to cd  to the
directory that I want to copy from and then do (as root)
 find . | cpio -pdmuv /destination
It will preserve all owners, times, links and will recreate empty
directories.
If you don't want to cross mounted filesystems then add the -mount
argument to find.


Matthias Oertli wrote:

> Hi all,
> I need to copy the contents of a linux partition onto a bigger
> partition on a replacement harddisk. I'd like an exact copy with all
> the permissions intact, etc.
> Would a  simple  cp -a /oldhd/* /newhd/*   do the trick is there a
> better way?
> Regards,
> Matthias
>
> --
>
> ---------------------------------------------------------------------
> Matthias Oertli   <[EMAIL PROTECTED]>
> --
> SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
> To unsubscribe send email to [EMAIL PROTECTED] with
> unsubscribe in the text

--
Mark Pearson BSc (Computing) -- Technical and Computer Support
Department of Nuclear Medicine, Concord Hospital
Hospital Road, Concord, NSW  2137
PH: 61-2-9767 7450 or 61-2-9767 6339  FAX: 61-2-9767 7451



--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text

Reply via email to