LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Command for writing over files? (https://www.linuxquestions.org/questions/linux-newbie-8/command-for-writing-over-files-125306/)

soulflyer 12-12-2003 03:44 PM

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. ;)

Khabi 12-12-2003 04:02 PM

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.

soulflyer 12-12-2003 05:26 PM

got it!

many thanks.


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