[K12OSN] Refining the script....more help? *please?*

Les Mikesell les at futuresource.com
Mon Nov 22 05:01:41 UTC 2004


On Sun, 2004-11-21 at 22:12, David Trask wrote:
> The script I need hellp with is below.  My latest hurdle....this script
> works great (the first time)...if I try to run it again it pauses for
> every file to ask my if I want to overwrite it. 

I can't duplicate that, but it might be a version difference in the cp
command.  The -f option (which you have) should force the copy without
asking.  However, the reason it is asking in the first place is that
RedHat/fedora has this in /root/.bashrc:
alias cp='cp -i'
so when you execute 'cp' as root, it sets the -i option, like it or
not.  In the version I'm using, with both -i and -f the one later on the
command line wins. You can avoid the issue by executing /bin/cp instead
of just cp or get rid of the alias and type the -i only when you want
it).  

And, of course, I'll take this opportunity to remind you that if you
had backuppc running, you would already have copies of everything that
you could restore with a couple of clicks on a web page...

---
  Les Mikesell
    les at futuresource.com





More information about the K12OSN mailing list