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.
(cd /home_old; tar cf - .)|(cd /home_new; tar pxvf -)
It does the same thing as "cp -a":
* preserves mode, ownership, timestamp
* copys symolic links as links
* includes subdirectories and hidden files
Please pay close attention to the ownership of files and directories, because it is preserved as *numerical* value (=UID). In your case this doesen't seem to be a problem, but if you transfer partitions between different Systems, on the same machine, or even on different machines, this is will sureley get in your way.
Trust me. 8-(
well I think under this circumstances, transfering the contents of one directory to another directory on the same machine, compression is not only unnecessary but obstructive.
The only thing it does is to compress bits (slow), move them from harddisk to harddisk (fast) (or partition to partition, fast too) and then decompress bits (slow). If you get rid of compression here there is only one fast step left. 8-)
When it comes to archiving data, compression is a must! Well, mostly a must. ;-)
while this is Your life and You do as You please, there is one thing I want to tell. ;-)
In Linux and Unix as a whole, there are no such beasts as "extensions" in filenames. The dot is simply a part of the filename.
Take a look at /etc/rc.d/ and at the files therein. "rc.inet1" has its "filetype" at the beginning! (It is a "rc-script".) And what about "/etc/ssh/ssh_conf"? Look Ma, no extension! ;-)
"ls *.*" is very different from "ls *" which is what you actually meant.
"*.*" means "all things with names containing a dot", while "*" means "all things, with a name at all". Try it for yourself and please be sure that really all files have been transferred!
And the partitions can be checked with "fdisk -l" (as root) or, even much nicer, with "parted" (also root required) which shows the filesystems on the partitions too.
cp won't copy hidden files unless you use the -a option, which also preserves all permissions and ownership of the files if possible.
cp -av is what the Slackware ZipSlack HOWTO recommends for 'migrating' your installation to a linux partition. Works fine if you don't need any compression during transfer.