Copy Home Directory

Home Sweet Home

If you want a quick 'n' easy way to copy your home directory to another disk, or just to copy a bunch of files effortlessly, use the following command:

cp -avx /home /new/path

This will copy everything in your home directory including hidden files.

It will retain file ownership and creation data.

You can also use tar to copy /home

Use the following command:

(cd /home; tar cf - .)|(cd /new_home; tar pxvf -)

This does the same as cp -a

Preserving mode, time, ownership, and other data. It also copies symlinks, hidden files and subdirs.

Thats about it!