LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   cp --reply=yes deprecated!! (https://www.linuxquestions.org/questions/linux-general-1/cp-reply%3Dyes-deprecated-665387/)

fredsub 08-25-2008 09:01 PM

cp --reply=yes deprecated!!
 
cp --reply=yes deprecated!!

so some wiseass deprecated it, it would be okay if only --force
would also work, but apparently not, because i still get a prompt.

i know in shell script i can do

cp --force file tofile <<%%
yes
%%

but i would prefer to use cp in perl

ie
#!/usr/bin/perl

system("cp --force ".$fromfile." ".$tofile);

so maybe this is a perl question, as i don't know how to do the
<<%%
yes
%%
with that perl.

or i would prefer another unix copy command that works,

Thanks

Mr. C. 08-25-2008 09:43 PM

yes | cp src dest


All times are GMT -5. The time now is 12:01 PM.