LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-23-2016, 01:45 AM   #1
Adol
Member
 
Registered: Feb 2011
Location: Osaka, Japan
Distribution: Gentoo, Opensuse
Posts: 262

Rep: Reputation: 5
Use wget to download newest version of file


Hello,

I made a script to automate a linux install with all packages and configurations for a security server at work.

Everything works well, but I would like to tweak it to download the newest version of a proprietary package.

The problem I'm having is that the package provider makes minor updates frequently, and the revision number of the package changes. The way I am currently using "wget" is very simple, and it doesn't download unless I provide the complete name of the package:

Code:
wget http://username:password@exacq.com/reseller/7.6/exacqVisionServer-7.6.2.94278.deb
What would you recommend to download the newest revision when the script runs? Can you somehow use a wildcard in wget, then run a find on everything that was downloaded?(wildcard didn't work when I tried it)
 
Old 04-23-2016, 02:37 AM   #2
HT-Borås
Member
 
Registered: Apr 2016
Location: Borås, Sweden
Distribution: elementary OS
Posts: 44

Rep: Reputation: 15
If you can get this via FTP, wget supports wildcards. Not via http, however.
 
Old 04-23-2016, 01:38 PM   #3
ondoho
Senior Member
 
Registered: Dec 2013
Posts: 4,176

Rep: Reputation: 835Reputation: 835Reputation: 835Reputation: 835Reputation: 835Reputation: 835Reputation: 835
  • look at wget documentation. maybe it's possible to just go for the newest file?
  • consider using other download tool like curl?
  • get the name of the newest version by parsing some web content, then tell wget to download that. can be automated in a script.
i think i like the last option best
 
1 members found this post helpful.
Old 09-04-2016, 02:29 PM   #4
Adol
Member
 
Registered: Feb 2011
Location: Osaka, Japan
Distribution: Gentoo, Opensuse
Posts: 262

Original Poster
Rep: Reputation: 5
a little late for thanks, but thank you!

Curl does pretty much what I want, and it can follow re-directs.
 
  


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
Download the newest file seprob Linux - Networking 7 12-09-2014 12:18 PM
wget: download if file size does not match any file in folder Si14 Linux - Software 1 04-21-2013 07:00 AM
download file via wget ust Linux - Newbie 18 03-08-2011 04:44 AM
Should I download newest Linux kernel 2.6 version? trien27 Linux - Kernel 2 06-06-2009 05:47 PM
wget any version of a file? shishimo Linux - General 1 07-08-2004 02:37 PM


All times are GMT -5. The time now is 04:18 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration