Flylib.com

Books Software

 
 
 

rlogin-remote login

 <  Day Day Up  >  

rlogin ”remote login

rlogin [ L ] [ 8 ] [ ec ] [ l username ] hostname

rlogin establishes a remote login session from your terminal to the remote machine named hostname . Hostnames are listed in the host's database, which may be contained in the /etc/ hosts file, the Network Information Service (NIS) hosts map, the Internet domain name server, or a combination of these. Each host has one official name (the first name in the database entry), and, optionally , one or more nicknames. Either official hostnames or nicknames may be specified in hostname . A list of trusted hostnames can be stored in the machine's file /etc/hosts.equiv .

 <  Day Day Up  >  
 <  Day Day Up  >  

rm removes files from directories

rm [f] [i] filename...

rm r [f] [i] dirname...[filename...]

rm removes the entries for one or more files from a directory if the file has write permission. If filename is a symbolic link, the link will be removed, but the file or directory to which it refers will not be deleted. A user does not need write permission on a symbolic link to remove it, provided he or she has write permissions in the directory.

Example A.46.
1   rm file1 file2

2   rm -i *

3   rm -rf dir

EXPLANATION

  1. Removes file1 and file2 from the directory.

  2. Removes all files in the present working directory, but asks first if it is okay.

  3. Recursively removes all files and directories below dir and ignores error messages.

 <  Day Day Up  >  
 <  Day Day Up  >  

rmdir removes a directory

rmdir [p] [s] dirname...

Removes a directory if it is empty. With “p , parent directories are also removed.

 <  Day Day Up  >  
 <  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  >  
 <  Day Day Up  >  

ruptime ”shows the host status of local machines

ruptime [ alrtu ]

ruptime gives a status line “like uptime for each machine on the local network; these are formed from packets broadcast by each host on the network once a minute. Machines for which no status report has been received for five minutes are shown as being down. Normally, the listing is sorted by hostname, but this order can be changed by specifying one of ruptime 's options.

 <  Day Day Up  >