Re: simple zip via cron problem

robert wrote:

Hi all, allow the example to explain. This works:

cd /usr/local/builds/checkout/at_branch1/applications/AlphaTheoryWeb/
zip -r /tmp/ *
adding: com/ (stored 0%)

The problem: I can't change to a dir in a script running via cron - at
least it didn't seem to work. If I run this script:


/usr/bin/zip -r /tmp/ /usr/local/builds/checkout/at_branch1/


I get:
adding: usr/local/builds/checkout/at_branch1/applications/

I don't want 'usr/local/builds/checkout/at_branch1/applications/
AlphaTheoryWeb/src/java/' part of the filenames , just com and below .
I did man zip , and after trying -j and -i I can't get the effect I
want. Any ideas ?

What's wrong with


cd /usr/local/builds/checkout/at_branch1/applications/AlphaTheoryWeb/src/java
/usr/bin/zip -r /tmp/ *


You should be able to cd to the directory. If this doesn't work then send us the error message you get.

Good luck,



Relevant Pages

  • How do I check for a message with quotes in an EXPECT script
    ... I have an Expect Script running and I want to check for a particular ... Notice the double quotes above as part of the message. ... following in my Expect Script but it did not capture this error (I ...
  • simple zip via cron problem
    ... I can't change to a dir in a script running via cron - at ... AlphaTheoryWeb/src/java/' part of the filenames, ...
  • script running under cron destroys files
    ... I have a script running under cron which backs up mail folders. ... the o/s is suse entreprise linux 8 ...
  • Re: Scripting backup of file naming?
    ... > be distinctive both to allow for reference when needing to restore a ... > Is there a simple way to do this with a script running from cron? ... you want to run and use cron to call it periodically. ...
  • Re: Expect and backspace characters
    ... >I have an Expect script running from the Cron, ... >filter out the local echo and / or the backspace characters that are ...