PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

tar vs. cp for copying directories


Your Ad Here

Your Ad Here

Let's not forget 'cpio'. :-)

The simple "cp -au" method will work just fine with any reasonably modern implementation of 'cp', and it will automatically handle sparse files correctly, for which 'tar' would need the "S" option. Using "cp -au" will also be more efficient. There's no way the sending 'tar' process can know what files need to be sent, so it has to send everything. The best you can do is tell the receiving 'tar' process to skip over the files that are already up to date.

Rebooting Windows machine
On Sun, 10 Jul 2005 15:06:33 -0500, Moe Trin staggered into the Black Sun and said: If you have ActiveState Perl installed on the 'Doze machine(s...

Historically, both 'tar' and 'cp' have had various cases that they did not handle well -- device files, hard links, symbolic links, ..., that sort of thing. The only thing I know of that is a problem today is SELinux security contexts, and AFAIK neither 'tar' nor 'cp' handle that. The 'star' variant of 'tar' does handle security contexts.

There's not much reason to use 'rsync' unless you're copying across a network. It's strong point is reducing the amount of information transmitted, and it even handles small changes to large files by sending only the changed portion. But for copying between two local disks, checksumming portions of files to see what changed is at least as expensive as simply copying, and you need to supply a pretty lengthy set of options to 'rsync' to get the same effect as a simple "cp -au".

-- Bob Nichols AT comcast.net I am "rnichols42"



Your Ad Here

List | Previous | Next

Rebooting Windows machine

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

NIC works on "SCO Unix