The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
no options nascimento.rp AIX 2 08-20-2006 11:46 AM
options terms5 UNIX for Dummies Questions & Answers 1 01-26-2006 10:50 PM
sed h and g options sivasenthil_k Shell Programming and Scripting 9 01-04-2006 06:21 AM
options with awk mips Shell Programming and Scripting 2 05-15-2004 12:33 AM
cat and wc options Laura01 Shell Programming and Scripting 1 09-08-2002 08:21 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 07-12-2001
Registered User
 

Join Date: Jul 2001
Posts: 5
cp options

Hello again,

Is there an option for the cp command to overwrite existing files in the destination directory?

Cheers

Rob
Forum Sponsor
  #2  
Old 07-12-2001
Registered User
 

Join Date: May 2001
Location: Allentown, PA
Posts: 54
cp will automatically overwrite an existing file with the same name unless you use -i (interactive)
  #3  
Old 07-12-2001
Registered User
 

Join Date: Jul 2001
Location: California
Posts: 42
if you do have an alias set up for cp (i.e. alias cp "cp -i" )
and do not want to chage the alias

try put "\" before cp
i.e
$ \cp FileName newFileName
this will skip all interactive questions.
Hope this help
__________________
:rolleyes:
  #4  
Old 07-12-2001
Registered User
 

Join Date: Nov 2000
Location: India
Posts: 83
hi

to overwrite exsiting file give
cp filename1 filename2
in this case filename2 will be overwritten with the contents of filename1.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:32 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0