Thats what i ended up doing guys cd /home; ssh <Hostname> 'cd /home; tar -cf - `cat /home/seb/users`' | tar xf -
Thanks for the help Regards Seb On Sat, 2002-11-09 at 00:23, Manuel Soto wrote: > Why don't you use tar or cpio and then transfer only one file and > restore files and attributes from this file?. > > Later, > MS > > On Fri, 2002-11-08 at 04:18, PlugHead wrote: > > If I'm reading the man page correctly, the -p option preserves the modes of > > the files (e.g. rwx), not the owner. Keeping the owners could be a bit > > problematic, since the owner id on one system is probably different from the > > owner id on another system... > > > > If all of the your files need to have the same owner, I would first copy them > > to some empty temp directory, do a 'chown user.group -R *' in that directory, > > then move them to where they need to be... Otherwise, I have no simple > > answers... :) > > > > (Although, it should be possible to create a script that changes the owner, > > based on the directory name under home (e.g. /home/plughead.) Something > > like: > > > > cd /home > > for i in * ; do chown $i.$i -R $i ; done > > > > might do the trick...) > > > > HTH, > > -Jason > > > > On Thursday 07 November 2002 10:13 pm, Sebastian McDonagh wrote: > > > Hi guys, > > > > > > Time to change over the mail server and am copying down /home to the new > > > server. I am currently trying to do this via scp, now i dont claim to > > > be any expert but from reading the man pages on scp i should be able to > > > use the -rp switches to 1. Copy recursively and 2. maintain file > > > permissions of those directories and subdir. > > > > > > Anyway my problem is twofold and i would really appreciate any > > > assistance you guys could give. > > > > > > The first thing is copying the directories over, > > > The command i am using is, > > > > > > scp -rp X.X.X.X /home/* /home/ > > > > > > Now this sure gets the directory down but then they are all owned by > > > root and are in the root group. Now this is obviously going to be a > > > problem. > > > > > > What am i doing wrong ? Does anyone out there know how to maintain the > > > permissions of the files. > > > > > > The second issue is if i have the files down and they are all owned by > > > root and in the root group, does anyone have a script that would allow > > > me to change the ownership and groups of the 120 or so directorys. > > > > > > The ideal i spose would be to copy the necessary home directorys without > > > changing the permissions in the first place. > > > > > > Sorry if it is a bit rambling, would be great if someone was able to > > > assist. > > > > > > Regards > > > > > > Sebastian > > > ATR Australia > > > > -- > > > > ========================= > > "You like it?" he said to Mort, in pretty much the same tone of voice > > people used when they said to St George, "You killed a *what*?" > > -- Mort tastes scrumble for the first time > > (Terry Pratchett, Mort) > > > > > > ---- > > > > > Want to buy your Pack or Services from MandrakeSoft? > > Go to http://www.mandrakestore.com > > > > > ---- > > Want to buy your Pack or Services from MandrakeSoft? > Go to http://www.mandrakestore.com
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com