for loop for scping files to a list of servers

This little command line statement will copy a folder of files to the list (space separated) of hosts in your client list.

for i in `cat client_list.txt`;do `scp -r directory root@$i:~/`;done

You also need to load keychain on your desktop and have your ssh key loaded on the server to avoid typing your password for each host.

You can also run a single command on each server like this example using df -h:

for i in `cat client_list.txt`;do echo $i; ssh root@$i ‘df -h’;done

Tags:

Leave a Comment

Mac: Switch from ulgy 3D dock to cool 2D one

Just use the command:

defaults write com.apple.dock no-glass -boolean YES; killall Dock

Tags: ,

Leave a Comment

Wuff —- Wuff!!!

When using a mac to connect to screen running on my linux box, I would get  message: “Wuff —- Wuff!!!” whenever I used the backspace (delete) key.

This is super annoying, here is the fix:

Add:

alias screen='TERM=screen screen'

to the .bashrc of the screen user on your linux box.

Tags: , ,

Comments (3)

Create Western Digital Data Lifeguard Diagnostic bootable USB drive in Ubuntu Linux

I am building a new software linux RAID array consisting of 4 1TB Western Digital green drives to replace my aging array of 6 200GB maxtor drives that are quickly reaching the end of their usable life. When I recieved the new drives one of them was making a bad clicking noise and was obviously bad. I needed to confirm this for the return by running the Western Digital Diagnostic Tools. I had a few problems though, I am not running windows, nor do I have a working cd/dvd drive in the server not to mention not having a working bootable dos cd.

What is the solution?

A combo of freedos, grub and bootable USB.

[Read the rest of this entry...]

Tags: , , , ,

Comments (2)

First Post!

First post on my blog. I’m creating this so I remember how to do stuff. I always come up with cool stuff, but if I don’t write it down some where I will forget. What better place to write it down then a blog where I can access it from anywhere and/or help other people if they have the same problem or want to do the same thing.

outofhere

Tags:

Leave a Comment