For more information, see the hosts.equiv(4) man page.
$ rsh remotehost echo test
If test is echoed back to you, you have permission to execute remote commands. If Permission denied is echoed back to you, check your setup as described in Step 1.
$ tar cvf - filenames | rsh remote-host dd of=/dev/rmt/n obs=block-size
Creates a tape archive, lists the files as they are archived, and specifies the tape device.
Provides additional information about the tar file entries.
Represents a placeholder for the tape device.
Identifies the files to be copied. Separate multiple files with spaces.
Pipes the tar command's output to a remote shell.
Represents the output device.
Represents the blocking factor.
Example 28-12 Copying Files to a Remote Tape Drive (tar and dd)
# tar cvf - * | rsh mercury dd of=/dev/rmt/0 obs=126b a answers/ 0 tape blocks a answers/test129 1 tape blocks a sc.directives/ 0 tape blocks a sc.directives/sc.190089 1 tape blocks a tests/ 0 tape blocks a tests/test131 1 tape blocks 6+9 records in 0+1 records out
$ cd /var/tmp
$ rsh remote-host dd if=/dev/rmt/n | tar xvBpf -
Indicates a remote shell that is started to extract the files from the tape device by using the dd command.
Indicates the input device.
Pipes the output of the dd command to the tar command, which is used to restore the files.
$ ls -l
Example 28-13 Extracting Files From a Remote Tape Drive
$ cd /var/tmp $ rsh mercury dd if=/dev/rmt/0 | tar xvBpf - x answers/, 0 bytes, 0 tape blocks x answers/test129, 48 bytes, 1 tape blocks 20+0 records in 20+0 records out x sc.directives/, 0 bytes, 0 tape blocks x sc.directives/sc.190089, 77 bytes, 1 tape blocks x tests/, 0 bytes, 0 tape blocks x tests/test131, 84 bytes, 1 tape blocks $ ls -l