LinHES Forums
http://forum.linhes.org/

How to copy /myth dir to a new hd with right permissions
http://forum.linhes.org/viewtopic.php?f=2&t=7104
Page 1 of 1

Author:  runer [ Sun Nov 27, 2005 1:11 pm ]
Post subject:  How to copy /myth dir to a new hd with right permissions

I have connected a new sata drive that I plan to store my /myth files on. But before I go on editing the fstab I am wondering how to copy the myth folders and files to the new drive with right permissions.

Thanks for help!


newbie

Author:  cesman [ Sun Nov 27, 2005 1:58 pm ]
Post subject: 

Code:
cp -a /myth /path/to/newdrive

Author:  runer [ Mon Nov 28, 2005 11:06 am ]
Post subject: 

Thanks for answer, but when I try this command I get different permissions on the copy when I type ls -l /myth. Any ideas :?:

Author:  tjc [ Mon Nov 28, 2005 1:00 pm ]
Post subject: 

The most reliable way I know of doing this is to use the old tar trick. Note that you need to do this as root:
Code:
( cd /myth ; tar cf - . ) | ( cd /NewMyth ; tar xf - )

Author:  ethernut [ Tue Nov 29, 2005 12:40 am ]
Post subject: 

Tar would work great as tjc said. cp -rpv * /newmyttv should preserver the permissions as well.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/