moving /home [Solved - Corrected HowTo]

Les Mikesell lesmikesell at gmail.com
Mon Dec 5 23:02:38 UTC 2005


On Mon, 2005-12-05 at 16:46, Tony Nelson wrote:
> >
> >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?

That will create /mnt/mynewhome/home which isn't what you
want.
cp -a /home/ /mnt/mynewhome 
would get it right.  Cd'ing and copying '.' gets it right without
remembering that detail and you need to know what '.' means
anyway.

-- 
  Les Mikesell
    lesmikesell at gmail.com




More information about the users mailing list