| Re: cp --copy-contents questions On Sat, 14 Jun 2008 08:04:33 -0700, enjoyfate wrote:
> hi,guys
> when i read the cp manual, found that have a --copy-contents option , in
> the manual it says :It is usually a mistake to use this option, as it
> normally has undesirable effects on special files like FIFOs and the
> ones typically found in the /dev directory. I wonder why should remain
> this option since it always cause mistake just as the manual says. which
> scenario should use it ?
> thanks
I don't see in the manual where it says it always causes mistakes.
Sometimes you may have a special file in a folder and you want to copy
the contents of the special file. Maybe you have a disk device in a
folder, and you want to copy the entire disk. The manual I read says it
will have problems with some special files, such as FIFOs, /dev/console/
and /dev/zero. "--copy-contents" is for when you know what special files
are in a folder, and you know you want to copy their contents.
stonerfish |