Open Source Software and Linux

Oct 13 2008   12:48AM GMT

Two Linux utilities you should always have

John Little Profile: Xjlittle

Those two utilities are aria2 and screen.

Quite often as administrators we have to download large files. We may start this work from a workstation at work or over the VPN to a server at work. The best way that I’ve found to handle this task is using aria2.

The aria2 utility is command line driven. It supports downloads via bittorrent, http(s), ftp and metalink. It can download one file or multiple files from multiple sources or protocols simultaneously. In handling multiple downloads it attempts to utilize all of your available download bandwidth.

Downloading via a local bittorrent file is as simple as

aria2c file1.torrent file2.torrent

or from an http site
aria2c http://site/file.torrent

If you want to download multiple torrents use this command:

aria2c -s2 http://host/image.iso http://mirror1/image.iso http://mirror2/image.iso

If you want to download the same file from two different locations use:

aria2c -s2 http://host/image.iso http://mirror1/image.iso http://mirror2/image.iso

The -s2 indicates that you want to download from two site. If one of the sites fail aria2 will attempt to use the 3rd listed sitte.

I’ll leave you to visit aria2’s site and explore the many options that they have to offer.

The next utility is screen. In many case you will find that it works very well to use aria2 and screen together.

Screen is a utility that, when logged into a remote machine via ssh, you can start a screen session and begin your work. If you lose your ssh connection screen will still have the job that you started earlier when you again log in. You can also detach the screen session from you current ssh session, go home or move to another work station, log in again and reattach to your screen.

This is a fantastic utility that becomes a real life saver when running long jobs, downloading large files such and iso’s and having documents open via ssh using an editor such as VIM. Imagine that you just started compiling a kernel and were called away from your office. Over the standard ssh session you have no way to check the progress. With screen though you can log in to the remote machine, attach to the screen session and check on the progress of your compile.

I say that it can work hand in hand with aria2 because of downloading large files such as iso’s. Start your screen session and your aria2 job, detach from your screen session and go home or wherever you need to go. Once at your destination login to the remote machine and reattach to your screen session. If the iso is downloaded mount it via a loop device and do whatever you need with it.

Both of these utilities are command line driven, very powerful and helpful, and very easy to use. You can probably find them in your rpm or deb repositories. Give them a spin and you just might find a whole new way of computing or at the very least to really great utilities to put in your tool box.


 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: