user3526312
user3526312

Reputation: 75

force overwrite the copy command ssh?

I'm looking for something like forcing/bypassing overwrite in ssh on copy command??

For Example : If I have a file test1 in /home and in /root

I want to copy the file from root to overwrite on home directory like if I write

cp test1 /home

cp: overwrite `/home/test1'?

How can we remove this question? How can we force it not to show this overwrite line ... bypass this to yes bydefault I tried -Rf but not working still I'm seeing this....

Anything on this is great help ... I check stack overflow and received this answer but didn't get weather it is working or not

yes | cp -R test1 /home

Is there anything wrong on this??

Thanks & Regards

Kishan Giri

Upvotes: 3

Views: 8503

Answers (1)

Rahul R Dhobi
Rahul R Dhobi

Reputation: 5806

you can use cp -f test1 /home command

Upvotes: 3

Related Questions