Linux System Administration

Not everyone has unlimited Internet download. Sometimes Internet provides provide peak and off-peak hours and hardly is someone going to stay up at night to trigger their downloads.

There are many tools in Linux which allows user to set a timer to automatically start download without user intervention. Here is a simplest form of automatic off-peak download involving at, wget and shutdown command. First create a file which will contain wget and shutdown commands:

mydownloads.txt:

wget ftp://ftp.redhat.com/pub/redhat/rhel/beta/6/i386/iso/RHEL6.0-20100414.0-AP-i386-DVD1.iso
wget http://ftp.monash.edu.au/pub/linux/CentOS/5.5/isos/i386/CentOS-5.5-i386-bin-DVD.iso
shutdown -h now

Now use at command to execute all command within mydownloads.txt file:

at -m 02:00 < mydownloads.txt

At command will automatically start download at 2AM and when downloads are finished it will shutdown your PC.

NOTE: For shutdown you need sudo or run command as root

Working with the terminal using a command interface is very fast and effective way of doing stuff. But have you tried working with the terminal, listening to a music via headphones and having a terminal warning or tab-completion beep / bell turned ON at the same time? Well it can be very annoying. Listening to the PC Speaker beeps via headphones is very close to a feeling of hitting your head with a hammer. Even without headphones this beeping bell sound is very annoying.

Here are some hints on how to disable terminal beep / bell :

First try to disable a terminal tab-completion bell by editing /etc/inputrc and add / replace line:

set bell-style none

You can also use the visible directive but make sure that audible is commented !

#set bell-style visible
#set bell-style audible

This may not be all. If you are a vim / vi user the PC speaker beep will still annoy you. To turn it of temporarily type a following vim command while in vim:

:set visualbell

To tunr it off completely edit or create a .vimrc file in your home directory ( ~/ ) and add a following line:

set visualbell

If none of the above helps simply get rid of the PC Speaker beeps by removing a pcspkr module from your system. This should silence it completely:

# rmmod pcspkr

If you do not want to hear that annoying beep / bell of your PC Speaker again even after system reboot do the following:

# vi /etc/modprobe.d/blacklist

and add the following line into the list:

blacklist pcspkr

If your apache is chowing a indexes when browsing /var/www directory tree it might be considered as a security weakness. Unless you need your users to browse entire directory tree you may need to change a default apache setting in /etc/apache2/sites-available/yousite :

FROM:

Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride None
Order allow,deny
allow from all

TO:

Options -Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride None
Order allow,deny
allow from all

Page 64 of 72



Free Linux eBooks

Go to top