Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2004
    Posts
    143

    Unanswered: find a file on a remote machine

    I have 2 unix servers dev1 and dev2.
    I have a shell script that runs in dev1 that is supposed
    to look in the dev2 server for a specific file (clearance.dat) which
    is located at /home/biotox folder(on dev2)

    How can I mention this in the script tht runs on dev1?

    Thanks

  2. #2
    Join Date
    Jan 2004
    Location
    Bordeaux, France
    Posts
    320
    A possible solution is to use rsh
    Code:
    if [ `rsh dev2 -l user_dev2 'test -e /home/biotox/clearance.dat ; echo $?'` -eq 0 ]
       then echo 'File found'
       else echo 'File not found'
    fi
    Jean-Pierre.

  3. #3
    Join Date
    Feb 2004
    Posts
    143
    You are a treasure. Thanks

  4. #4
    Join Date
    Feb 2004
    Posts
    143
    I tried what you mentioned,
    But when I run the script, I get

    remshd: Login incorrect.
    spk4rsh: 0041-003 No tickets file found. You need to run "k4init".
    nologin: test: 0403-004 Specify a parameter with this command.
    File Not found


    What could be wrong ? Atleast it spit out "File Not found". But the file is actually there and should be found.

    Thanks

  5. #5
    Join Date
    Jan 2004
    Location
    Bordeaux, France
    Posts
    320
    The problem comes from the rsh command.
    There is a problem of identification on the remote (dev2) server.
    remshd: Login incorrect.
    spk4rsh: 0041-003 No tickets file found. You need to run "k4init".

    nologin: test: 0403-004 Specify a parameter with this command.
    File Not found
    Contact your system manager.
    Jean-Pierre.

  6. #6
    Join Date
    Feb 2004
    Posts
    143
    Thank you. Let me call him

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •