WinRar Cronjob
Hello Everyone,
I'm trying to setup a cronjob that performs an unrar command. Here is the background information: WinRar Version: 3.4.1 cronjob profile: ==================================================== HOME=/usr/local/ RAR='-s -md1024' LIBPATH=/usr/lib 20 18 * * * /usr/local/apache/cgibin/weblogs/test.sh here's your typical shell script. test.sh: ==================================================== HOME=/usr/local/apache/cgi-bin/weblogs/ RAR='-s -md1024' LIBPATH=/usr/lib for i in `ls /usr/local/apache/cgi-bin/weblogs` do /usr/local/bin/unrar x $i $HOME done Here's the permissions: ==================================================== -rwxrwxrwx 7075743.rar -rwxrwxrwx 8003000.rar -rwxrwxrwx 9003000.rar -rwxrwxrwx 0003000.rar -rwxrwxrwx 12003000.rar the cron is setup with the correct profile and has executable permssions because he belongs to the chgroup. Here is the output that I'm getting keeping it short: ==================================================== 7075743.rar UNRAR 3.41 freeware Copyright (c) 1993-2004 Alexander Roshal Cannot open 7075743.rar No files to extract There are definitely files within these rar's. In fact, when you run the script it extracts the to the directory. You guys have any ideas? :Pengy: |
I wonder how much experienced Linux users laugh at newbies forums...
Here's the answer that worked for me: in test.sh if you add the line... cd $HOME line right before the execution of the command... your ready to go. Onward through the fog and towards that LPIC!!! |
All times are GMT -5. The time now is 03:40 AM. |