Witch cp ?

Herta Van den Eynde herta.vandeneynde at cc.kuleuven.be
Thu Mar 16 23:40:03 UTC 2006


Linux doesn't really use file extensions.  You can create a perfect text 
file and call it "thisismytextfile" or "thisismytextfile.txt".  Both 
will be recognized as "ASCII text".

However, if you use *.*, only files that have a dot will be copied. 
You'll miss files without dots, including hidden files.  In addition,
softlinks will be copied as files.

If your /srcpartition contains sockets, Manuel's dd is a safe bet.  (You 
can check by means of "find /srcpartition -type s".)  If the partition 
consists of regular file, I prefer a trick I learned from the Tru64 
manpages:

# cd fromdir; tar cf  -  .  |  (cd todir;  tar xpf -)

because I have the impression it runs faster.  (Haven't really timed it, 
though.)

Kind regards,

Herta


Bliss, Aaron wrote:
> I need to copy an entire partition and all it's subdirectories to a new
> partition; do I want cp -rp /srcpartiton/* /destpartiton/ or cp -rp
> /srcpartiton/*.* /destpartiton/ ?  Thanks for your help.
> 
> www.preferredcare.org
> "An Outstanding Member Experience," Preferred Care HMO Plans -- J. D. Power and Associates
> 
> Confidentiality Notice:
> The information contained in this electronic message is intended for the exclusive use of the individual or entity named above and may contain privileged or confidential information.  If the reader of this message is not the intended recipient or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that dissemination, distribution or copying of this information is prohibited.  If you have received this communication in error, please notify the sender immediately by telephone and destroy the copies you received.

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm




More information about the redhat-list mailing list