View Single Post
  #2 (permalink)  
Old 06-14-2008, 09:10 AM
J.O. Aho
Tablet PC Guest
 
Posts: n/a
Re: cp --copy-contents questions

enjoyfate******.com wrote:

> 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 ?


A common thing to do is to not remove options, as you may break old
scripts (for example someone wrote a shell script in the mid 70's and
the company still uses the script but no one anymore knows about it,
think what would happen if the whole system would go down for a option
has been removed).

It's used when you copy normal files which are inside a directory (which
in own turn may have other directories inside itself with normal files),
cp -R --copy-contents directoryname /newlocation/newname

But the option ain't that commonly used.

--

//Aho
Reply With Quote

 
Old 06-14-2008, 09:10 AM
Xploder HD Movie Player for PS3. Manage, convert and transfer media files between the PC and PS3.