For some reason wget downloads an 8 byte file instead of the original - linux

Downloading this specific file http://www5.mp4upload.com:182/d/skxswmshz3b4quuof6ue2kskcg2hdh7otrmeb56mjbszssvgh22btuy6/video.mp4
using wget like so
wget http://www5.mp4upload.com:182/d/skxswmshz3b4quuof6ue2kskcg2hdh7otrmeb56mjbszssvgh22btuy6/video.mp4
Seems to only download an 8 byte file, while using this link in your browser correctly grabs and downloads the whole file. What is the issue in this case?

Related

Unable to extract shape_predictor_68_face_landmarks.dat for bz

I am trying to run some face frontalization code (using Python3 on Windows10), the code uses opencv and dlib and requires a file called shape_predictor_68_face_landmarks.dat. The code tries to automatically download it and then unzip it but it fails to unzip giving an unexpected end of archive error. I tried to use WinRaR to repair the file (which I also tried manualy downloading from http://sourceforge.net/projects/dclib/files/dlib/v18.10/shape_predictor_68_face_landmarks.dat.bz2) but it says it can only repair .zip and .rar files.
Does anyone know where I can download the uncompressed .dat file from? Or alternatively how I can repair a damaged .bz file in Windows?
The file is available at
http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
I downloaded it and verified that extraction works. The file is smaller than the one used in the previous version, but I think that is due to improvements.
In case this does not work, let me (or Davis King, who maintains the dlib blog) know so that you can get the uncompressed version.
Downloading using the CLI is a lot easier.
wget http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
To decompress the compressed file you just downloaded, use the following command
bzip2 -d shape_predictor_68_face_landmarks.dat.bz2
As mentioned above, download shape_predictor_68_face_landmarks.dat
from here. But while downloading, downloads gets failed(i faced this issue). So, if you're also facing the same issue, then i recommend to download it via command-line:
$ wget link

Downloading latest version from sourceforge

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.

Download file served by a page using wget

I am trying to download a file served by a particular page in linux using wget. Note that I don't want to download the html page itself, but the .tiff file that is downloaded when the page loads. If I use
wget http://www.dli.gov.in/scripts/FullindexDefault.htm?path1=/data7/upload/0180/365&first=35&last=479&barcode=2030020017599
then it downloads the webpage instead of the tiff file served by it. How do I do this?
If you use chrome you can view the .tiff file's url .If you get it, you just command this:
wegt the-url-of-.tiff
Bingo!
You can try an alternative i.e cURL command. Its usage is: curl -O url.
Make sure about permissions and other stuff like that.

install eclipse via terminal

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.

how to download using wget in binary mode - linux

I need to download *.tar.gz file from server but when I do that, I get an error
ERROR: The ./files.tic seems to be corrupted.
I think it is because it has been downloaded in ASCII mode, and I need to download in binary mode.
How to run wget in binary mode? Or any other command to get binary file.
This file is from http, not ftp.
AFAIK the MIME type for the file does not change its contents. So you should be already getting the right representation of it. HTTP protocol does not have text/binary types for data. Data is data :)
See http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Response_message for further info.

Resources