|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
Re: [PLUG] copying a complete system to new HD
|
>>>>> "LB" == Luis Baars <luisbaars@hotmail.com> writes:
LB> On Wed, 5 Jul 2000 04:13:11 -0400 (EDT), Bill wrote:
>> # cp -a /dirname /mnt/dirname
LB> Wouldn't it be better to use tar? When you use cp, file perms,
LB> owners, and groups get all screwed up....don't they? I would
LB> probably use the following command:
Actually, the -a param to GNU cp causes the following (from man cp)
-a, --archive
same as -dpR
-d, --no-dereference
preserve links
-p, --preserve
preserve file attributes if possible
-R, --recursive
copy directories recursively
To me, that looks like it should take care of maintaining
permissions. And, as he said in the snipped part, you could unset
your UMASK, which should prevent permission mangling.
LB> # tar cf - /dirname | (cd /mnt/dirname; tar xvf -)
Which is similar to what I would use. I think you want a -p in there
so that you preserve permissions.
-kevin
--
Kevin Falcone <kevinfal@seas.upenn.edu>
"TIMTOWTDI, but did you have to pick the ugliest way you could find?"
-- Michael Carman in comp.lang.perl.misc
______________________________________________________________________
Philadelphia Linux Users Group - http://plug.nothinbut.net
Announcements - http://lists.nothinbut.net/mail/listinfo/plug-announce
General Discussion - http://lists.nothinbut.net/mail/listinfo/plug
|
|