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 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 132010
 

How to split a large file into multiple smaller files in Linux

Answer:

If you have a very large file and want to split into multiple smaller files, split command can do the job for you.

# split -l 10 text.txt

The above command split the file text.txt into a multiple files (xaa, xab, xac...), which contains at most 10 lines per file.

Jan 072010
 

Disable IPv6 in Linux

Answer:

To disable IPv6 during boot time.

1. edit /boot/grub/menu.lst

# sudo vi /boot/grub/menu.lst

2. append the following line at the end of your targeted kernel, save the file.

ipv6.disable=1

3. Restart your system and verify to see it is now disabled (The following command should return nothing)

# ip a | grep inet6

Jan 012010
 

How to install bulk packages using yum with groupinstall?

Answer:

Sometimes, if you forgot to select "Development Tools" during Fedora/CentOS installations, you can add them later by using one command

yum groupinstall "Development Tools"

Which save you a lot of times from installing the needed packages one by one.

To see what options are available for groupinstall, try

yum grouplist