Resolved: [PLUG] Proper way to copy directories
Richard C. Steffens
rsteff.l at comcast.net
Fri Dec 24 17:01:55 UTC 2004
On Wednesday 22 December 2004 10:32 am, Richard C. Steffens wrote:
> here's today's question: is this the form of the cp command I should have
> used?
>
> cp -r -p all /home/rsteff /home2
> Or, is there another command I should be using?
Thanks for all the replies. I finally used:
tar -c -C /home . | tar -x -C /home2
This seems to have worked. The copy I made before must have missed something
because when I opened K-Mail and clicked on a message in the list, the
subject changed from what is should be to something indicating that there was
no subject, and no message appeared in the lower pane, either. Fortunately, I
did not delete the original, so I could go back and reconstruct the old
setup.
I'm assuming that's where the problem was. Here's what I did.
Exited X.
Switched to a console screen.
Logged in and su'd to root and cd'd to /.
Cleaned out the contents of /home2 with rm -r.
Ran { tar -c -C /home . | tar -x -C /home2 } followed by the following:
umount home2
mv home home1
mv home2 home
mount /dev/hda8 home
Then I switched back to the X login screen, and logged back in. I did change
fstab to reflect the change from mounting /dev/hda8 on /home2 to /home.
All seems to be working, so far. I'll give it a day or so, and then I'll feel
comfortable deleting the old home directory and moving my collection of
photographs over so I can work on them with the GIMP.
I thought about trying rsync, but discovered that it is not installed. I made
that discovery after I was logged in on the console screen. I think that's
the only thing I have to grouse about regarding the SuSE personal
distribution: several tools that are commonly installed with other
distributions do not come standard with this one. I can easily add them with
YaST, but it is slightly frustrating to want to use something that "always
used to be there" and find it missing. Make is another example. I don't use
it a lot, but every once in a while I like to try out something that comes as
source files, so I'll have to add make, and I'll have to check to see what
other development tools aren't there, like a compiler. Not a big deal; just a
minor annoyance.
Thanks again for all the support this group provides.
Merry Christmas to all.
--
Regards,
Dick Steffens
http://home.comcast.net/~rsteff/
More information about the PLUG
mailing list