LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-12-2003, 04:44 PM   #1
soulflyer
LQ Newbie
 
Registered: Nov 2003
Posts: 2

Rep: Reputation: 0
Post Command for writing over files?


Hello,

I have a large amount of files I need to copy from my home directory to another user's directory.
I know the basics of copying files, however in this case, I need to write over the existing files with the same name.

Using the basic cp command via SSH, it asks me if I wish to overwrite the existing file, which I do - However as I said, I have about 200 files to write over, and I'm wondering if there is a command to simply tell it to write over what is there without prompting me on every file.

Any help would be greatly appreciated.
Thank you.

the oober newbie.
 
Old 12-12-2003, 05:02 PM   #2
Khabi
Member
 
Registered: Aug 2003
Location: Arizona
Distribution: Gentoo
Posts: 142

Rep: Reputation: 15
well, you could use cp -f. Depending on your system you might have to do "unalias cp" at the command prompt. This is because there might be an alias that sets cp to "cp -i" witch forces you into interactive mode.

Either way, that should work.
 
Old 12-12-2003, 06:26 PM   #3
soulflyer
LQ Newbie
 
Registered: Nov 2003
Posts: 2

Original Poster
Rep: Reputation: 0
got it!

many thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
writing gui wrappers for command line tools Genjix Programming 2 01-10-2005 10:25 AM
Writing XML files from C++ application Ezeeckiel Programming 1 04-19-2004 04:06 AM
writing to files in C ocularbob Programming 9 02-17-2004 01:06 PM
writing in read only files endezeichen Linux - Software 3 12-20-2003 04:48 PM
Writing Single files to a CD jimmmac Linux - Software 11 04-27-2003 05:20 PM


All times are GMT -5. The time now is 08:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration