rsh-starts a remote shell

 <  Day Day Up  >  

rsh ”starts a remote shell

 rsh [ n ] [ l username ] hostname command rsh hostname [ n ] [ l username ] command 

rsh connects to the specified hostname and executes the specified command. rsh copies its standard input to the remote command, the standard output of the remote command to its standard output, and the standard error of the remote command to its standard error. Interrupt, quit, and terminate signals are propagated to the remote command; rsh normally terminates when the remote command does. If a command is not given, then rsh logs you on to the remote host using rlogin .

Example A.47.
 1   rsh bluebird ps -ef 2   rsh -l john owl ls; echo $PATH;cat .profile 

EXPLANATION

  1. Connects to machine bluebird and displays all processes running on that machine.

  2. Goes to the remote machine owl as user john and executes all three commands.

 <  Day Day Up  >  


UNIX Shells by Example
UNIX Shells by Example (4th Edition)
ISBN: 013147572X
EAN: 2147483647
Year: 2004
Pages: 454
Authors: Ellie Quigley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net