Post date: Oct 20, 2018 10:20:48 AM
curl is a tool to transfer data from or to a server, using one of thesupported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP,IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS,TELNET and TFTP). The command is designed to work without user inter?action.
Basic usage is fairly simple - just pass the URL as input to the curl command, and redirect the output to a file.
curl http://releases.ubuntu.com/18.04/ubuntu-18.04-desktop-amd64.iso.torrent > test.torrent
force curl to use the name of the file being downloaded as the local file name. This can be done using the -O command line option.
curl -O http://releases.ubuntu.com/18.04/ubuntu-18.04-desktop-amd64.iso.torrent
If you want curl to follow the redirect, use the -L command line option instead.
curl -L http://www.oneplus.com
Resume a download from point of interruption?
curl -C - -O http://releases.ubuntu.com/18.04/ubuntu-18.04-desktop-amd64.iso
wget is similar to curl. On Linux, wget is more common than curl. Whereas curl is the equivalent in MacOS.
To download the whole directory, wget is better
wget -r http://releases.ubuntu.com/18.04/ubuntu-18.04-desktop-amd64.iso