Go Back   Technology Questions > Software Questions > Operating System Questions > Linux

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 06-14-2008, 07:10 AM
enjoyfate@gmail.com
Tablet PC Guest
 
Posts: n/a
cp --copy-contents questions

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 06-14-2008, 07:10 AM
Xploder HD Movie Player for PS3. Manage, convert and transfer media files between the PC and PS3.
  #2 (permalink)  
Old 06-14-2008, 08: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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 06-14-2008, 08:50 AM
jellybean stonerfish
Tablet PC Guest
 
Posts: n/a
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Templates, Copy, Visible text and document in use questions Bob Day Microsoft Office 0 01-08-2008 10:21 AM
I am not able to Copy or paste the any contents in MS Office Sridharan Microsoft Office 1 12-26-2007 05:40 AM
Copy User Profile Questions... C J. Windows XP 3 06-29-2007 11:00 AM
copy a folder contents to a spreadsheet KK Windows Vista 3 04-27-2007 04:15 AM
Copy Active Title Bar contents? NoSurprises Windows XP 3 02-13-2007 06:06 PM


All times are GMT -8. The time now is 01:34 PM.


2003 - 2008 All Rights Reserved. Technology Questions

SEO by vBSEO 3.1.0