Unix Admin Cheats
Random shell hacks
- shopt -s cdspell (forgives spelling errors in shell names)
Formating disks
(Assumes drive is 2nd IDE and target ext3 filesystem)
Check logs (
less /var/log/message) for correct device ID. Always check the drive ID a few times, formatting the wrong drive is funny in the bad way. Likely a second drive will behdb, assuming it’s on the primary channel. Linux systems letter driveshda,hdb,hdc,hddfor standard IDE channels. The master device on channel 0 ishda, the master device on channel 2 ishdc.Add a partition table (
/sbin/fdisk /dev/hdb).Add a file system (
/sbin/mkfs.ext3 -c /dev/hdb). It’s handy to use-cif you’re not sure about the drive. It’s also handy to watch the system log (tail -f /var/log/message) in another console, to see if there are any problems with the device as it’s formatted.

RSS