Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reference remote path

Status
Not open for further replies.

Scunningham99

Programmer
Sep 20, 2001
815
GB
Hi All

I would like to refefence a remote directory (to test if a file exists on another server). i am ok with coding test and mapping drives etc, and am aware of .rhosts and hosts.equiv etc.

I know i can map a drive however was wondering is there any way i can just reference remote directory something like server2:/home/user01.

THANKS IN ADVANCE!
 
Perhaps the simplest solution would be something like:

[tt]if `rsh host "test -f /my/filename && echo true || echo false"`
then
echo It exists.
else
echo It does not.
fi[/tt]

I'm not sure you can use the host:filename syntax in anything other than RMT interfaces (such as used by ufsdump/restore), NFS mounts or rcp commands? Annihilannic.
 
Hello Scunningham99,

Try this:
ls -l /net/myserver/mydir

If the above works you should be able to do this:
cd /net/myserver/mydir



Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top