LinuxQuestions.org
Visit Jeremy's Blog.
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, 12:45 AM   #1
Adol
Member
 
Registered: Feb 2011
Location: Osaka, Japan
Distribution: Gentoo, Opensuse
Posts: 271

Rep: Reputation: 6
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, 01:37 AM   #2
HT-Borås
Member
 
Registered: Apr 2016
Location: Borås, Sweden
Distribution: CentOS
Posts: 54

Rep: Reputation: 18
If you can get this via FTP, wget supports wildcards. Not via http, however.
 
Old 04-23-2016, 12:38 PM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
  • 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, 01:29 PM   #4
Adol
Member
 
Registered: Feb 2011
Location: Osaka, Japan
Distribution: Gentoo, Opensuse
Posts: 271

Original Poster
Rep: Reputation: 6
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 11:18 AM
wget: download if file size does not match any file in folder Si14 Linux - Software 1 04-21-2013 06:00 AM
download file via wget ust Linux - Newbie 18 03-08-2011 03:44 AM
Should I download newest Linux kernel 2.6 version? trien27 Linux - Kernel 2 06-06-2009 04:47 PM
wget any version of a file? shishimo Linux - General 1 07-08-2004 01:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:20 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