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.

Linux Ask!

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

Jan 182010
 

How to determine the type of a file in Linux

Answer:

The file command is what you need, e.g.

# file /bin/gzip

/bin/gzip: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), 
dynamically linked (uses shared libs), for GNU/Linux 2.6.15

# file /usr/share/doc/apt/changelog.gz

/usr/share/doc/apt/changelog.gz: gzip compressed data, from Unix, 
max compression