Skip to content

Copying multiple files around a secure network

17/10/2012

The unix team in my job have given us access to the boxes that we’ll be running our new software on. I like to have everything the same ( as much as possible) on the boxes I work on. Now the hardware lads got a bit lax when they were doing user set up and gave a fairly decent user environment on one of the boxes but didn’t bother with the rest of them so I decided to copy the good setup from that box to the rest. Now in the old days I’d have to use ftp and call get/put commands and all that jazz but this time I used scp

The actual command I used was
scp username@hostname:~/\{.bashrc,.bash_logout,.emacs,.bash_profile\} .

The place I found this with somemore useful examples is here. I now have the same profile everywhere I go on this particular system. If I ever get the chance I’ll have to take the best features I have over the various systems I’m on and amalgamate them.

I’ve just been thinking and maybe I did this arse about face. Maybe I should’ve set up a for loop on the node with the good setup and used scp to push the good config to the other nodes 😦

for node in ip1 ip2 ip3 ip4 ip5 ip6
do
echo $node
scp ~/\{.bashrc,.bash_logout,.emacs,.bash_profile\} username@$node:~/
echo
done

Let me know if you think it’ll work.

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: