| |||
| 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 |
| |||
| 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 |
| |||
| 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 |
![]() |
| Bookmarks |
| Thread Tools | |
| |
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 |