≡ Menu


HowTo: Linux Play Video CD

How do I play video cd under Linux operating systems? How do I play .dat file under Linux?
[click to continue…]

How do I install Linux kernel source with Ubuntu patches? How can I install Ubuntu Linux kernel source code tree for version 2.6.3x using command line options?
[click to continue…]

HowTo: UNIX Restart Apache Server

How do I restart Apache web server under UNIX operating systems using command line or over the ssh session?
[click to continue…]

How do I Be More Productive In Vim?

This is a user contributed FAQ.

Q. I'm just starting in vim text editor but I'm annoying typing and retyping similar statements. Can you address me about it?
[click to continue…]

Moving Around With vim (keyboard short cuts)

This is a user contributed FAQ.

Q. Can you tell me few useful vim text editor keyboard short cuts for moving around while editing text files?
[click to continue…]

Q. How do I setup cacth-all email accounts under Postfix MTA? For example if an email send to me@domain.com, info@you.com and sales@you.com, should be sent to the same email address.

This is useful if anyone of user mistypes an email address when they send it to me, or just guesses at a valid email address, then they will likely get an error message from my server such as user / email mail box does not exist. So I wish to set up a "catch all" address

A. Mapping is done using /etc/postfix/virtual file.
# vi /etc/postfix/virtual
Append code as follows, replacing domain and emailusername with actual values:
@yourdomain.com emailusername

Save and close the file. Run following command:
# postmap /etc/postfix/virtual

Also make sure you have following line in /etc/postfix/main.cf file:
virtual_alias_maps = hash:/etc/postfix/virtual

If you just added above, line reload postfix:
# service postfix reload

Caution: if you set up a catch-all email address, you will likely receive more unsolicited (spam) email.

Q. I have two disk-mirrored array, suppose if one of my disk in mirrored RAID array fails, then I will replace that disk with new one (I have hot swapping SCSI drives). Now question is how I rebuild a RAID array after a disk fails.

A. A redundant array of inexpensive disks, (redundant array of independent disks) is a system, which uses multiple hard drives to share or replicate data among the drives. You can use both IDE and SCSI disk for mirroring.

If you are not using hot swapping drives then you need to shutdown server. Once hard disk has been replaced to system, you need to use used raidhotadd to add disks from RAID-1, -4 and -5 arrays, while they are active.

Assuming that new SCSI disk is /dev/sdb, type the following command:# raidhotadd /dev/mdX /dev/sdbReplace /dev/mdX with actual raid device name (e.g. /dev/md0). While array is under construction, you can see progress and other information by typing following command:# cat /proc/mdstat

See also: