LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 12-01-2011, 05:02 AM   #1
ericalism
LQ Newbie
 
Registered: Nov 2011
Posts: 3

Rep: Reputation: Disabled
unrar a file after finishing downloading


Hello,I'm a totally noob about linux.

and I often download movies in my vps,

the problem is they are always in .rar format,

and I've tired of unraring them time after time,

I'm wondering if they can be unrared automatically as soons as the

downloading is completed

The hardest part for me is how to judge if the downloading

is completed,I haven't any ideas at all now

Anyone can help me?

Last edited by ericalism; 12-01-2011 at 07:08 PM.
 
Old 12-01-2011, 08:07 AM   #2
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Code:
wget -O archive.rar <url-to-download> ; unrar archive.rar
?
 
Old 12-01-2011, 10:11 AM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I would use flashgot (FF extension) + download manager that handles rar files (jdownloader for example).
 
Old 12-01-2011, 06:57 PM   #4
ericalism
LQ Newbie
 
Registered: Nov 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MTK358 View Post
Code:
wget -O archive.rar <url-to-download> ; unrar archive.rar
?

sorry,I forgot to mention I'm using transimission to download

and I would like solve it like this:
excute a script hourly(I heard that cron can do this),
to judge if the downloading is completed(and this is what I'm most concerned about,how to do?by detecting the file size or some better way?)
when it is OK,the unrar command will be excuted

will this be possible?

Last edited by ericalism; 12-01-2011 at 07:02 PM.
 
Old 12-01-2011, 07:04 PM   #5
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
That should be easy except I have no idea how to tell if it's downloaded.

How would checking the file size work, unless either all files are the same predetermined size or there's a way to tell what the final size of the file is?
 
Old 12-03-2011, 08:21 AM   #6
ericalism
LQ Newbie
 
Registered: Nov 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MTK358 View Post
That should be easy except I have no idea how to tell if it's downloaded.

How would checking the file size work, unless either all files are the same predetermined size or there's a way to tell what the final size of the file is?
yes,I just have no idea how to tell if it's downloaded either~
 
Old 12-03-2011, 09:24 AM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
I'm not used to Transmission, but looking at the official documentation it states that "Transmission can be set to invoke a script when downloads complete" and they provide an example of mail notification. Instead of sending mail you can unrar the downloaded file instead, using the environment variable TR_TORRENT_NAME as the name of the file to be extracted. Here is the relevant page: https://trac.transmissionbt.com/wiki/Scripts. Hope this helps.
 
Old 12-03-2011, 02:15 PM   #8
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Quote:
Originally Posted by MTK358 View Post
Code:
wget -O archive.rar <url-to-download> ; unrar archive.rar
?
It's "unrar e archive.rar" if I'm not mistaken...
 
  


Reply



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
I need to unrar a .rar file. mail522569 Fedora 13 01-19-2007 12:02 AM
Unrar gives error while trying to extract file gnukish Linux - Newbie 2 06-26-2005 06:19 AM
How to unrar a passworded rar file? jon_k Linux - Software 2 06-10-2005 10:43 AM
not getting way to unrar the file b0nd Linux - Newbie 3 04-04-2005 01:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:16 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration