I am trying to download latest version of graphicsmagick from Sourceforge in my bash script
wget -q https://sourceforge.net/projects/graphicsmagick/files/latest/download?source=files -O GraphicsMagick-LATEST.tar.gz
tar -xzvf GraphicsMagick-LATEST.tar.gz
The problem is that when I try to extract the tar.gz I get the following error
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
This means that the script is not downloading the latest tar.gz but rather another filetype?
Why is that happening and what I am missing here?
I suggest:
wget -q -O - ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/GraphicsMagick-LATEST.tar.gz | tar -xzvf -
Forget about my prevoius answer. The issue is not in the file. When you use wget with your current link, you are pointing to a sourceforge page. You are not downloading the file, but you are downloading the HTML page. Rename your file to .html and you can see all code of the sourceforge page.
wget -q https://sourceforge.net/projects/graphicsmagick/files/latest/download?source=files -O file.html --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:10.0) Gecko/20100101 Firefox/10.0"
Will download an HTML.
The link you provide has a javascript redirect to the correct link depending in your operating system (as I have described in my other answer). But wget cannot execute this javascript code, therefore is not redirected. Still the link is inside the HTML. Search for the the next string:
Problems with the download? Please use this
And after this string, you can find the direct link to the last version:
http://downloads.sourceforge.net/project/graphicsmagick/graphicsmagick/1.3.25/GraphicsMagick-1.3.25.tar.gz?r=&ts=1482426819&use_mirror=vorboss
(Note about that if you use the --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:10.0) Gecko/20100101 Firefox/10.0", the link is for the tar.gz not for the .rpm)
You must therefore download the HTML file each time, search for the download link inside the HTML (with the currently latest version), and use it in a new wget command.
You are forcing the file to be renamed as a tar.gz extension. But the file is in a different format. In fact, when you download directly the link, the file is not a gz file, but a rpm file.
You need to download directly the file you want:
wget https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/1.3.25/GraphicsMagick-1.3.25.tar.gz/download -O GraphicsMagick-LATEST.tar.gz
But here, you are predefining the version of the file you want to download.
I am trying to install eclipse in a linux box via terminal using below command but it doesn't work.
wget "http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/SR2/eclipse-jee-luna-SR2-linux-gtk-x86_64.tar.gz&mirror_id=454"
When it gets downloaded, I see this file name which is wrong?
download.php?file=%2Ftechnology%2Fepp%2Fdownloads%2Frelease%2Fluna%2FSR2%2Feclipse-jee-luna-SR2-linux-gtk-x86_64.tar.gz
Instead it should be - eclipse-jee-luna-SR2-linux-gtk-x86_64.tar.gz What's wrong?
I renamed the file to correct name and tried untarring it but I get an error as shown below:
tar -xvzf eclipse-jee-luna-SR2-linux-gtk-x86_64.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
What's wrong?
Using wget for eclipse Java
command is :
wget http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/technology/epp/downloads/release/2022-03/202203101200/eclipse-java-2022-03-R-linux-gtk-aarch64.tar.gz
You can change the release of eclipse in the URI. See this link for more information. I hope that's useful for you.
Any URL which includes download.php will have this problem with wget, even the so called "Direct Link".
With more recent download pages however, there is a way to find the actual URLs, and that's to look inside the xml file that download.php uses for mirror selection.
For example, if we go to the Eclipse IDE 2020-03 page, most of the URLs are download.php links, but in the "Other options for this file" side bar, we can see an xml link.
If we navigate there with our web browser and then look at the page source, we can see the actual file URL used by every mirror. Depending on the Web Browser used, the page may be blank, in which case we need to look at the Page Source to see the raw xml and thus the URLs.
For me, in the UK, the UK mirror service site would be my best option:
<mirror url="http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/oomph/epp/2020-03/R/eclipse-inst-win64.exe" label="[United Kingdom] UK Mirror Service (http)" />
These (actually) direct URLs do work with wget.
Looks like issue with the download link form eclipse website itself.
Please try with the below URL (I have tested it in Ubuntu 14 and its working)
http://eclipse.stu.edu.tw/technology/epp/downloads/release/luna/SR2/eclipse-jee-luna-SR2-linux-gtk.tar.gz
Using a Debian variant?
sudo apt-get install eclipse
Otherwise, I think you just copied the link from the main Eclipse download page, which is a link to another page which grabs the fastest mirror for the download of the file.
For example, the link it gave me is this, which downloads fine
http://mirror.cc.columbia.edu/pub/software/eclipse/technology/epp/downloads/release/luna/SR2/eclipse-jee-luna-SR2-linux-gtk-x86_64.tar.gz
After that, the answer is mostly contained on AskUbuntu: How to install Eclipse?
If you're Using Ubuntu 20.04.4 LTS
$ wget file-link
Downloaded file might look like this :- download.php?file=%2Foomph%2Fepp%2F2022-06%2FR%2Feclipse-inst-jre-linux64.tar.gz
Execute following command:
1.First Move to download directory.
2.Execute tar -xvf eclipse-inst-jre-linux64.tar.gz
3.Move to Dir - cd eclipse-installer
4. Execute ./eclipse-inst. It will ask you which dev mode you want to install please select and click next.
Once installed successfully you will get can see launch icon.
Use a console version of oomph installer:
Download Console Oomph Installer, choose the appropriate download for your target platform (zip or tar.gz), example for Linux:
wget -O installer.tar.gz https://search.maven.org/remotecontent?filepath=com/github/a-langer/org.eclipse.oomph.console.product/1.0.1/org.eclipse.oomph.console.product-1.0.1-linux.gtk.x86_64.tar.gz
Extract archive and change current directory:
tar -xvzf installer.tar.gz
cd eclipse-installer/
Install "Eclipse IDE for Java Developers":
./eclipse-inst -nosplash -application org.eclipse.oomph.console.application -vmargs \
-Doomph.installation.location="$PWD/ide" \
-Doomph.product.id="epp.package.java"
Wait for the installation to complete, last version of Eclipse will be installed in "$PWD/ide".
LATEST
|############################################################|100%
More examples see in https://github.com/a-langer/eclipse-oomph-console.
I want to use the linux wget command on several URLs. In Shiny, right clicking the download button or link gives the following info:
../session/../download/downloadData?w=
This can be used with the linux wget command to download the file if the page is open.
Is it possible to begin a Shiny download using the URL link without knowing the session data?
My goal is to do something like this:
wget "http://home:3838/../#apples=3" -O /home/../apples.csv
wget "http://home:3838/../#pears=3" -O /home/../pears.csv
and so on.
I already know how to add parameters but I do not know how to actuate the download.
How do I ftp or download the following in linux console without using browser?
ftp://ftp.denx.de/pub/u-boot/u-boot-2011.12.tar.bz2
You can use wget to download files from HTTP and FTP from the command line:
wget ftp://ftp.denx.de/pub/u-boot/u-boot-2011.12.tar.bz2
This will create a file named u-boot-2011.12.tar.bz2 in the current directory.
I am trying to download the package from https://github.com/justintime/nagios-plugins/downloads using wget, but what I am getting is the html file of the link I mentioned not the package. I tried this command:
wget -r -l 1 https://github.com/justintime/nagios-plugins/downloads
Is there any way to download the package from the above link?
wget is giving you what you asked for. You dint specify the package link. You are specifying the page link. Right click on the Download button of the required package on the page and select Copy Link Address and specify that address to wget
This works
wget -r -l 1 https://github.com/justintime/nagios-plugins/zipball/master