Darren DeHaven wrote: > I need the deprecated mv and cp command parameter "--reply=" to stay.
The problem is that it never worked as desired. > I've noticed that the parameter "--reply=no" is "deprecated" > > " cp: the --reply option is deprecated; use -i or -f instead " Yes. See this reference for more information. http://www.gnu.org/software/coreutils/faq/#cp-and-mv-the-reply-option-is-deprecated The problem is that --reply=no only had an affect when the command would normally have prompted. In particular it had no effect when the command would *not* have prompted. This could lead to silent data loss. Silent data loss is very, very bad. See this message for examples: http://lists.gnu.org/archive/html/bug-coreutils/2005-06/msg00172.html > My issue: In a script without user input, I want to copy a file to a > directory if only the file doesn't already exist, (I don't want to > overwrite anything), and regardless of the time stamp. > > The only way I see to do this is with the deprecated parameter: > "-i --reply=no" The solution is to use rsync instead. $ rsync --ignore-existing foo bar > Example: > "cp -i --reply=no foo bar" > > This way if bar exist, then foo won't overwrite it. That is incorrect. It will overwrite the file if the input is redirected such as when run from cron or when the input is redirected by the user. If the input is not a tty then the command would not normally prompt. When the command does not prompt the reply is not used. In that case the target is overwritten. > This message (including attachments) contains information which is > confidential and privileged. Please see: http://goldmark.org/jeff/stupid-disclaimers/ Bob