SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Once you have created a partition and filesystem. Mount the new partition and copy all your data. Unmount the old partition or move the /home folder if it is on the root partition. Then mount the new partition as /home. Then all you need to do is update fstab to mount the new home on boot.
Copying the files like that will change their owner and group to whatever user copied them (probably root). What you want to do is move them but I don't know if the standard move command will move directory trees. You could use midnight commander but failing that, I suggest you tar the entire directory, delete the old files, mount the new partition as /home, and untar the entire directory using the -p switch to preserve the permissions:
tar jcvf /tmp/home.tar.bz2 .
rm -rf *
mount /dev/hdb1 /home
tar jxvpf /tmp/home.tar.bz2
-r duplicates directories recursively
-p preserves mode,ownership and timestamp
(see also: man cp) ;-)
The second consideration uses the tar command as LSD suggested, but in a slightly different way:
(cd /home-old ; tar cf - .)|(cd /home-new ; tar pxvf -)
The advantages are:
preserves *all* protection information (see also: man tar)
Symbolic links are transfered as symbolic links and not as files.
There is no real file created, so no additional diskspace is used while transfering the data.
Disadvatage: both directories must exist before the transfer.