Re: Debian Mirror
On Sun, 28 Apr 1996, Kevin M Bealer wrote:
> > Is there any reason why the tar command is better than "cp -af"?
>
> I have always heard it's because 'cp' copies symlinks as real files, but GNU
> cp doesn't seem to do that when using (-af). Also there is a (-d) option
> which is supposed to prevent this behavior.
yep, 'cp -a' is the same as 'cp -dpR'. '-f' is force.
Extracted from the cp(1) man page:
-a, --archive
Preserve as much as possible of the structure and
attributes of the original files in the copy. The
same as -dpR.
-d, --no-dereference
Copy symbolic links as symbolic links rather than
copying the files that they point to, and preserve
hard link relationships between source files in the
copies.
-p, --preserve
Preserve the original files' owner, group,
permissions, and timestamps.
-R, --recursive
Copy directories recursively.
Craig
Reply to: