Sponsored Content
Top Forums Shell Programming and Scripting Wget - working in browser but cannot download from wget Post 302967990 by Prasannag87 on Wednesday 2nd of March 2016 06:09:47 AM
Old 03-02-2016
IBM Wget - working in browser but cannot download from wget

Hi,

I need to download a zip file from my the below US govt link.

https://www.sam.gov/SAMPortal/extrac...Y_20160207.ZIP

I only have wget utility installed on the server.

When I use the below command, I am getting error 403 forbidden, but in browser, I am able to download.

Code:
$ wget https://www.sam.gov/SAMPortal/extractfiledownload?role=WW&version=SAM&filename=SAM_PUBLIC_MONTHLY_20160207.ZIP
[1]     42598834
[2]     46531048
xxxx : /home/xxxx $ --05:04:02--  https://www.sam.gov/SAMPortal/extractfiledownload?role=WW
           => `extractfiledownload?role=WW'
Resolving www.sam.gov... 66.77.18.172
Connecting to www.sam.gov[66.77.18.172]:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
05:04:03 ERROR 403: Forbidden.

How can I download the file from wget?

P.S:
I can able to download another zip file from same portal:

Code:
$ wget https://www.sam.gov/public-extracts/SAM-Public/SAM_Exclusions_Public_Extract_16061.ZIP
--05:07:06--  https://www.sam.gov/public-extracts/SAM-Public/SAM_Exclusions_Public_Extract_16061.ZIP
           => `SAM_Exclusions_Public_Extract_16061.ZIP'
Resolving www.sam.gov... 66.77.18.172
Connecting to www.sam.gov[66.77.18.172]:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5,303,014 [application/zip]

100%[=================================================================================================================>] 5,303,014     --.--K/s

05:07:11 (51.05 MB/s) - `SAM_Exclusions_Public_Extract_16061.ZIP' saved [5303014/5303014]

I beleive the '&' sign is creating a problem. Please suggest how to fix it
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to download file using wget

Hi I need a Shell script that will download a text file every second from a http server using wget. Can anyone provide me any pointers or sample scripts that will help me go about this task ??? regards techie (1 Reply)
Discussion started by: techie82
1 Replies

2. UNIX for Dummies Questions & Answers

Using wget to download a file

Hello Everyone, I'm trying to use wget recursively to download a file. Only html files are being downloaded, instead of the target file. I'm trying this for the first time, here's what I've tried: wget -r -O jdk.bin... (4 Replies)
Discussion started by: thoughts
4 Replies

3. Shell Programming and Scripting

download a particular file using wget

Hi All I want to download srs8.3.0.1.standard.linux24_EM64T.tar.gz file from the following website : http://downloads.biowisdomsrs.com/srs83_dist/ But this website contains lots of zipped files I want to download the above file only discarding other zipped files. When I am trying the... (1 Reply)
Discussion started by: alphasahoo
1 Replies

4. UNIX and Linux Applications

download file using wget

I need to download the following srs8.3.0.1.standard.linux26_32.tar.gz file from the following website: http://downloads.biowisdomsrs.com/srs83_dist There are many gzip files along with the above one in the above site but I want to download the srs8.3.0.1.standard.linux26_32.tar.gz only from... (1 Reply)
Discussion started by: alphasahoo
1 Replies

5. Windows & DOS: Issues & Discussions

Disappearing wget download [Windows]

I downloaded and installed wget for windows, then used cmd.exe to run it directly from its install folder. I downloaded an 8.5 GB (yes, Giga) tar file, waited a couple of days, then tried to find it only to see that it's nowhere to be found! I don't want to re-download the whole thing, especially... (3 Replies)
Discussion started by: HalfThere
3 Replies

6. Shell Programming and Scripting

How to download file without curl and wget

Hi I need a Shell script that will download a zip file every second from a http server but i can't use neither curl nor wget. Can anyone will help me go about this task ??? Thanks!! (1 Reply)
Discussion started by: rubber08
1 Replies

7. Shell Programming and Scripting

Files download using wget

Hi, I need to implement below logic to download files daily from a URL. * Need to check if it is yesterday's file (YYYY-DD-MM.dat) * If present then download from URL (sample_url/2013-01-28.dat) * Need to implement wait logic if not present * if it still not able to find the file... (1 Reply)
Discussion started by: rakesh5300
1 Replies

8. Shell Programming and Scripting

How to cancel wget download after 1%?

I am running a video download test and automating that. I wanna know how to stop a wget download session when downloads reached 1% Thanks in advance, Tamil (11 Replies)
Discussion started by: tamil.pamaran
11 Replies

9. Shell Programming and Scripting

Wget download file ( do not overwrite )

Hello all, I want to write auto update script for my embedded device, which can check and download newer version of my program and extract the files on the device. The download center is hosted on remote web server . Script checks the hosted file on web site and if the new version is there... (8 Replies)
Discussion started by: stefki
8 Replies

10. Shell Programming and Scripting

How to change wget download directory?

i have a cron that mirrors a site periodically wget -r -nc --passive-ftp ftp://user:pass@123.456.789.0 i want to download this into a directory called /files but when I do this, it always create a new directory called "123.456.789.0" (the hostname) it puts it into /files/123.456.789.0 but... (3 Replies)
Discussion started by: vanessafan99
3 Replies
DIFFINDEX-DOWNLOAD(1)													     DIFFINDEX-DOWNLOAD(1)

NAME
diffindex-download - Download utility for Debian Contents files SYNOPSIS
diffindex-download [ options ] URL filename DESCRIPTION
diffindex-download is a command line tool for downloading Contents files. It uses APT's diff/Index format patches when available to avoid downloading the full file. diffindex-download is used by apt-file. OPTIONS
-n number If more than number patches would be necessary, download the whole file. Specifying 0 to always download the whole file is possible. -k Don't verify the peer certificate when using https. -c cacert If cacert is a directory: Use cacert as CA certificate path. Otherwise use cacert as CA certificate bundle. See the --capath and --cacert options in the curl(1) man page. -i Don't exit with errror if the URL does not exist. This is useful as some archives don't provide Contents files. -q Be quiet (opposite of -v). The default if stdout is not a terminal. -v Be verbose (opposite of -q). The default if stdout is a terminal. -d Print additional debug info. -h Display a short help screen. SEE ALSO
apt-file(1), diffindex-rred(1), curl(1) AUTHOR
diffindex-download was written by Stefan Fritsch <sf@debian.org>. January 2009 DIFFINDEX-DOWNLOAD(1)
All times are GMT -4. The time now is 09:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy