2

how is it possible to access one linux machine thru another. Following is the need

1) check if a linux machine say ab-080 exists or not.

2) if exists, then clean a directory. /tmp ( this can be done using tmpwatch or rm ...)

not aware at present of a command like the one in windows \unc path.....what is it.

Brgds,

kNish

  • 3
    Define "exists". – Ignacio Vazquez-Abrams Dec 13 '10 at 20:01
  • 3
    ssh? <!--padding--> – Adam Rosenfield Dec 13 '10 at 20:03
  • 2
    ssh, expect, NFS, Samba... (depends on what experience you want) – wkl Dec 13 '10 at 20:04
  • 1
    @Ignacio: so existential o.0 – Matt Ball Dec 13 '10 at 20:06
  • @Matt - Hah, well played. :) – EEAA Dec 13 '10 at 20:43
7

ssh ab-080 rm -r "/tmp/*"

  • 1
    you should probably escape or quote the *: ssh ab-080 'rm -r /tmp/*' – Nathan Fellman Dec 13 '10 at 21:38
  • good catch. that's what I get for writing in a hurry. – erjiang Dec 15 '10 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.