At 2:31 PM -0600 12/5/05, Jeff Vian wrote: >On Tue, 2005-12-06 at 00:41 +0500, Sergey wrote: >> Claude >> >> This is a prolix but a valid step-by-step instruction. You may want to >>publish >> it in a faq. >> >> One note: your command 'cp -a/home/* /mnt/mynewhome' would not copy >> the /home/.* entries. I don't really think there are chances such entries >> exist, however having such a job to do you've got to ensure. >> >You are correct *if* there were any .xxx entries in /home. I have never >seen any there, only within the users actual home directory >(/home/user), and the command he gives will handle all of those. It is >important when doing something like this to make sure all the >possibilities are covered so another way to do it and verify everything >was copied could be: ># cp -a /home/* /home/.[!.]* <dest/directory> >In this command it explicitly asks for anything beginning with a '.', >but since both '.' and '..' match they need to be excluded, thus the >[!.] (not dot) part. For clarity read up on regexps. > >Tim's recommendation is (I believe) actually a better command. ># cd /home ># cp -a . <dest/directory> >This form of the command will handle even the .xxx files in the current >directory properly. While we're beating this to death, doesn't: # cp -ar /home /mnt/mynewhome do the job, copying everything, even stuff that "*" wouldn't match, without having to try to force it? ____________________________________________________________________ TonyN.:' <mailto:tonynelson@xxxxxxxxxxxxxxxxx> ' <http://www.georgeanelson.com/>