Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

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


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, 04:02 PM   #2
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, 05:26 PM   #3
LQ Newbie
Registered: Nov 2003
Posts: 2

Original Poster
Rep: Reputation: 0
got it!

many thanks.


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 09:25 AM
Writing XML files from C++ application Ezeeckiel Programming 1 04-19-2004 03:06 AM
writing to files in C ocularbob Programming 9 02-17-2004 12:06 PM
writing in read only files endezeichen Linux - Software 3 12-20-2003 03:48 PM
Writing Single files to a CD jimmmac Linux - Software 11 04-27-2003 04:20 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:32 PM.

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