Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Jan 202010
 

Network connectivity testing using ping command

Answer:

To test the network connection between your server and other place, such as google.com, you can use the ping command

# ping google.com
PING google.com (64.233.189.103) 56(84) bytes of data.
64 bytes from hkg01s01-in-f103.1e100.net (64.233.189.103)..
64 bytes from hkg01s01-in-f103.1e100.net (64.233.189.103)..
64 bytes from hkg01s01-in-f103.1e100.net (64.233.189.103)..
64 bytes from hkg01s01-in-f103.1e100.net (64.233.189.103)..
.
.
.

Successful connection will return something similar to the above

Jan 202010
 

Parallel downloader in Linux

Answer:

wget is perhaps the most popular downloader (command) in Linux, but it cannot establish more than 1 connection to the server for max. speed.

Axel is a lightweight download accelerator for Linux that solve the problem.

To install under Ubuntu:

# sudo apt-get install axel

To download a file by using 10 connections

# axel -n 10 http://www.example.com/file.gz

That's very cool!

Jan 182010
 

How to resume a partially-downloaded file using wget

Answer:

Use the -c flag, e.g.

# wget -c ftp://sunsite.doc.ic.ac.uk/ls-lR.Z

If there is a file named ls-lR.Z in the current directory, Wget will assume that it is the first portion of the remote file, and will ask the server to continue the retrieval from an offset equal to the length of the local file.

Reference: http://www.gnu.org/software/wget/manual/wget.html