TIPS TRICKS and other helpful stuff

Stuff I have found or been sent that might help solve problems, improve performance, enhance security etc...


Software RAID is an inexpensive way to create instant backups and protect your systems against data loss in the event that one drive fails. Learn some basic RAID management.
Delivered each Tuesday, TechRepublic's free Linux NetNote provides tips, articles, and other resources to help you hone your Linux skills. Automatically sign up today!
Software RAID on Linux is a snap, thanks to the mdadm tool that comes with most modern Linux distributions. Software RAID, particularly RAID1, is an inexpensive way to create instant backups and protect your systems against data loss in the event that one drive fails.

To create a RAID device, execute the following command:

# mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 \

/dev/hda1 /dev/hdc1

There are two ways to obtain information about the RAID array. You can query the device with mdadm, which provides detailed information on a particular device, or you can get an overview of the entire RAID system by looking at /proc/mdstat directly. For example:

# cat /proc/mdstat

Personalities : [raid1] 

read_ahead 1024 sectors

md0 : active raid1 hda1[0] hdc1[1]
      56261376 blocks [2/2] [UU]

Here you can see that the personality is RAID1, the device /dev/md0 is active, and both disks are active (noted by [UU]). To obtain more detailed information about this device, use the following command:
# mdadm --detail /dev/md0

This will print out a variety of information about the device, including when it was created, its size, and the time it was last updated.

If you want to change drives, you can remove a device from the array. This command will prevent the partition /dev/hdc1 from appearing in the /dev/md0 array:
# mdadm /dev/md0 -r /dev/hdc1

You can also add the device back into the array. Here's how:
# mdadm /dev/md0 -a /dev/hdc1
While RAID management can be extremely complex, simple drive mirroring (like this RAID1 setup) is fairly easy. In addition, it offers a more flexible and cost-effective backup solution than expensive tape or removable media solutions.
Up Time and load on all systems
The command rup will give you system up time, and load averages for remote machines. It does this by broadcasting on the local network and displaying the responces.
Available options are:
-h Sort the display alphabetically by host name
-l Sort the display by load average
-t Sort the display by up time

NULL an Open FileBASH shell
To null a file to zero bytes while the file is in use (ie syslog) type > filename

Useful mt commands SunOS and Solaris
HINT set your environment varible TAPE to be the device descriptor for your tape drive in your .cshrc
fsf - forward space EOF marks
bsf - back space over EOF marks
asf - absolute space file number. This is equilivant to a rew followed by fsf
rew - rewind to begining of tape
eom - end of recorded media on tape (useful for appending to tapes)
offline, rewoffl - rewind tape and, if appropiate, take the drive unit offline by ejecting the tape.
status - Print status information about the tape drive
ret - retention the tape
erase - erase the entire tape

To copy from one host to another
rcp local_file remote_host:file_name
rcp local_file username@remote_host:file_name
rcp local_file username@remote_host.domain:file_name
Vaild Options:
  • -p Attempt to give each copy the same modification and access times, modes, and ACLs as he original file
  • -r copy each subtree rooted at file_name; In this case the destination must be a directory
    NT Server/Workstation
    MS Office
    Internet Explorer
    Netscape
    Windows95
    Windows98
    WindowsXP
    FireFox
    5 in 1 Network Cable
    Tips&Tricks