- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to download a file using curl or wget | ht...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2021 12:39 AM
тАО07-06-2021 12:39 AM
how to download a file using curl or wget | https
Hello Folks:
I am trying to download a file using curl from a website that's on the cloud, its a backup zip file. The zip file that it downloads is not a zip file but ascii file with html code.
I've tried various combinations/swtiches, but nothing helps. Here are a few things I tried:
$ curl -u username:password -L -J -O "https://FQDN/index.php?/admin/subscription/get_export/2/filename.zip"
$ curl -u username:password -L -J "https://FQDN/index.php?/admin/subscription/get_export/2" -o output.zip
If I hover over the actual zip file (that I want to download) in the browser I only see this: https://FQDN/index.php?/admin/subscription/get_export/2
and the zip file is the only zip file on that page the URL in the navigation bar in the browser shows this: https://FQDN/index.php?/admin/subscription#
Any thoughts?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2021 02:02 PM
тАО07-06-2021 02:02 PM
Re: how to download a file using curl or wget | https
> Any thoughts?
Without an actual URL or the actual "html code", all you get is
guesswork.
I'd guess that the web page uses active content (JavaScript), perhaps
to prevent people from doing exactly what you want to do. And curl or
wget can't interpret it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2021 10:34 PM
тАО07-19-2021 10:34 PM
Re: how to download a file using curl or wget | https
Hello,
Follow as below.
On a high-level, both wget and curl are command line utilities that do the same thing.
They both can be used to download files using FTP and HTTP(s).
You can also send HTTP POST request using curl and wget
However curl provides APIs that can be used by programmers inside their own code. curl uses libcurl which is a cross-platform library.
wget is just a command-line tool without any APIs.
Curl also supports lot more protocols that wget doesnтАЩt support. For example: SCP, SFTP, TFTP, TELNET, LDAP(S), FILE, POP3, IMAP, SMTP, RTMP and RTSP.
There is a major advantage of using wget. wget supports recursive download, while curl doesnтАЩt.
Wget Examples
The following example downloads the file and stores in the same name as the remote server.
wget http://www.openss7.org/repos/tarballs/strx25-0.9.2.1.tar.bz2
The following example download the file and stores in a different name than the remote server. This is helpful when the remote URL doesnтАЩt contain the file name in the url as shown in the example below.
wget -O taglist.zip http://www.vim.org/scripts/download_script.php?src_id=7701
Curl Examples
$ curl -O http://www.openss7.org/repos/tarballs/strx25-0.9.2.1.tar.bz2
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
28 3762k 28 1085k 0 0 72771 0 0:00:52 0:00:15 0:00:37 54267
OR
Follow the below link.
If you feel this was helpful please click the KUDOS! thumb below and accept the solution.
Regards,
I am a HPE Employee.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]