APC Australia

Download files from the shell

-

How about downloadin­g files from various online resources? The wget tool is your friend, capable of pulling content from HTTP, HTTPS, and FTP servers, like so: $ wget “http://url.com/file. zip”

Add the -O flag if you would like to save to a different directory

( wget -O /home/username/ Desktop/ http://url.com/file. tar ). As the file downloads, wget provides you with a progress bar, but if you’re downloadin­g a particular­ly large file, press Ctrl-C to cancel the current download, then use the -b flag to download in the background: $ wget -b -O /home/ username/Downloads/ http:// url.com/download.iso

Type ls -l -block-size=M and hit Enter periodical­ly to see how far the download has got by reviewing its file size.

A better tool for accessing FTP servers is the interactiv­e ftp tool: type ftp and press Enter to get started. The cursor changes to “ftp≥” so type the following to connect to a remote server: ftp≥ open ftp.example.com You’re prompted to enter a username and password if required, and then you’re in. Use the same tools you use to navigate your filesystem: cd for changing directorie­s, ls to list directory contents, and so on.

Type get filename to download a file to the directory you were in when you invoked ftp , or put filename to upload it from the same directory.

Need to grab a file using BitTorrent? Start by installing rTorrent ( sudo apt install rtorrent ). Next, type rtorrent , and then press Enter twice to reveal the “load. normal≥” line. Simply type or paste your torrent URL here and press Enter to load it. Now use the cursor keys to select the torrent file from the list, and press Ctrl-S to start the download. You can stop the download at any time using Ctrl-D, or quit rTorrent completely using Ctrl-Q.

Newspapers in English

Newspapers from Australia