LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-30-2005, 08:04 PM   #1
fmv020
LQ Newbie
 
Registered: Jun 2005
Posts: 2

Rep: Reputation: 0
Question 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?



 
Old 06-30-2005, 08:50 PM   #2
fmv020
LQ Newbie
 
Registered: Jun 2005
Posts: 2

Original Poster
Rep: Reputation: 0
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!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
winrar or zip owldbartle Linux - Newbie 10 11-16-2004 12:48 AM
Getting WinRar to work Mujju Linux - Newbie 10 11-14-2004 03:47 PM
WinRAR on Linux WarlockofVirgo Linux - Security 2 08-07-2004 10:03 PM
Unrar vs. Winrar sore Linux - Software 4 10-14-2003 12:32 PM
winrar with wine Rachid Boukhari Linux - Software 0 09-10-2001 05:41 AM


All times are GMT -5. The time now is 11:47 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration