Skip to content

Tipps und Tricks im Alltag

Manchmal mag ich Shell-Magie.
Hin und wieder muss ich auf jeder von mir betreuten Kiste eine bestimmte Datei editieren (zB Mailadressenänderung). Da gäbe es den langsamen Weg, mich auf jede Maschine einzuloggen, editieren und wieder auszuloggen.
Ich machs inzwischen etwas eleganter. Ich habe einen Alias (tcsh), der ein "foreach i ( ); " beinhaltet. Einmal alle Maschinen insgesamt, einmal nach Applikationen getrennt.
Wenn ich jetzt auf jeder Maschine was editieren will, tippe ich nur:

$ ALL
ssh -t ${i} vi /etc/opt/SUNWexplo/default/explorer
end


Und ich gehe nach und nach auf jede Maschine und ändere die Datei. Somit ist gewährleistet dass ich keine Maschine doppelt anspringe oder dass ich eine vergesse.

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

Sven Weise on :

Alternativ kann man für sowas auch "pconsole" benutzen. Das Tool öffnet mehrere ssh-sessions und terminals und stellt ein Master-Terminal zur Verfügung in dem man dann die Befehle/Konfigurationen eingeben kann die man auf all den Maschinen ausführen/einrichten möchte. Simultan.
Originalwebseite: http://www.ka.sara.nl/home/walter/pconsole/

Rince on :

Klingt nach einer guten Idee für eine Maschinenzahl unter 6 würde ich sagen. Bei 30-50 Mascinen wirds aber lästig wenn Du da dann erstmal 30-50 xterms aufploppen lassen musst; auch sowas kostet CPU-Zeit ;-)

lemming on :

Bei 30-50 Maschinen wäre sed vielleicht die bessere Wahl.

Falk on :

Schau dir mal "dsh" an: http://www.netfort.gr.jp/~dancer/software/dsh.html

Taugt für kleine bis große Cluster..

Add Comment

E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
To leave a comment you must approve it via e-mail, which will be sent to your address after submission.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
Form options