398 lines
7.3 KiB
HTML
398 lines
7.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of RMT</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>RMT</H1>
|
|
Section: GNU TAR Manual (8)<BR>Updated: January 27, 2014<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
rmt - remote magnetic tape server
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>rmt</B>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>Rmt</B>
|
|
|
|
provides remote access to files and devices for
|
|
<B><A HREF="/cgi-bin/man/man2html?1+tar">tar</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+cpio">cpio</A></B>(1),
|
|
|
|
and similar backup utilities. It is normally called by running
|
|
<B><A HREF="/cgi-bin/man/man2html?1+rsh">rsh</A></B>(1)
|
|
|
|
or
|
|
<B><A HREF="/cgi-bin/man/man2html?1+ssh">ssh</A></B>(1)
|
|
|
|
to the remote machine, optionally using a different
|
|
login name if one is supplied.
|
|
<P>
|
|
|
|
The calling program communicates with
|
|
<B>rmt</B>
|
|
|
|
by sending requests on its standard input and reading replies from the
|
|
standard output. A request consists of a request letter followed by
|
|
an argument (if required) and a newline character. Additional data,
|
|
if any, are sent after the newline. On success,
|
|
<B>rmt</B>
|
|
|
|
returns
|
|
<P>
|
|
|
|
|
|
<B>A</B><I>number</I><B>\n</B>
|
|
|
|
<P>
|
|
|
|
where <I>number</I> is an ASCII representation of a decimal return
|
|
code. Additional data are returned after this line. On error, the
|
|
following response is returned:
|
|
<P>
|
|
|
|
|
|
<B>E</B><I>errno</I><B>\n</B><I>error-message</I><B>\n</B>
|
|
|
|
<P>
|
|
|
|
where <I>errno</I> is one of the system error codes, as described in
|
|
<B><A HREF="/cgi-bin/man/man2html?3+errno">errno</A></B>(3),
|
|
|
|
and <I>error-message</I> is a one-line human-readable description of
|
|
the error, as printed by
|
|
<B><A HREF="/cgi-bin/man/man2html?3+perror">perror</A></B>(3).
|
|
|
|
<P>
|
|
|
|
Available commands and possible responses are discussed in detail in
|
|
the subsequent section.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>COMMANDS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>O</B><I>device</I><B>\n</B><I>flags</I><B>\n</B>
|
|
|
|
<DD>
|
|
Opens the <I>device</I> with given <I>flags</I>. If a
|
|
device had already been opened, it is closed before opening the new one.
|
|
<P>
|
|
<B>Arguments</B>
|
|
|
|
<DL COMPACT><DT id="2"><DD>
|
|
<DL COMPACT>
|
|
<DT id="3"><I>device</I>
|
|
|
|
<DD>
|
|
The name of the device to open.
|
|
<DT id="4"><I>flags</I>
|
|
|
|
<DD>
|
|
Flags for
|
|
<B><A HREF="/cgi-bin/man/man2html?2+open">open</A></B>(2):
|
|
|
|
a decimal number, or any valid <B>O_*</B> constant from
|
|
<B>fcntl.h</B>
|
|
|
|
(the initial <B>O_</B> may be omitted), or a bitwise or (using <B>|</B>)
|
|
of any number of these, e.g.:
|
|
|
|
|
|
576
|
|
64|512
|
|
CREAT|TRUNC
|
|
|
|
<DL COMPACT><DT id="5"><DD>
|
|
In addition, a combined form is also allowed, i.e. a decimal mode followed
|
|
by its symbolic representation. In this case the symbolic representation
|
|
is given preference.
|
|
</DL>
|
|
|
|
<P>
|
|
<B>Reply</B>
|
|
|
|
<DL COMPACT><DT id="6"><DD>
|
|
<B>A0\n</B>
|
|
|
|
on success.
|
|
</DL>
|
|
|
|
<P>
|
|
<B>Extensions</B>
|
|
|
|
<DL COMPACT><DT id="7"><DD>
|
|
BSD version allows only decimal number as <I>flags</I>.
|
|
</DL>
|
|
|
|
<DT id="8"><B>C</B>[<I>device</I>]<B>\n</B><DD>
|
|
Close the currently open device.
|
|
<DL COMPACT><DT id="9"><DD>
|
|
<DL COMPACT>
|
|
<DT id="10"><B>Arguments</B>
|
|
|
|
<DD>
|
|
<BR>
|
|
|
|
Any arguments are silently ignored.
|
|
<DT id="11"><B>Reply</B>
|
|
|
|
<DD>
|
|
<BR>
|
|
|
|
<B>A0\n</B>
|
|
|
|
on success.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="12"><B>L</B><I>whence</I><B>\n</B><I>offset</I><B>\n</B>
|
|
|
|
<DD>
|
|
<DL COMPACT><DT id="13"><DD>
|
|
Performs an
|
|
<B><A HREF="/cgi-bin/man/man2html?2+lseek">lseek</A></B>(2)
|
|
|
|
on the currently open device with the specified
|
|
parameters.
|
|
<DL COMPACT>
|
|
<DT id="14"><B>Arguments</B>
|
|
|
|
<DD>
|
|
<DL COMPACT><DT id="15"><DD>
|
|
<DL COMPACT>
|
|
<DT id="16"><I>whence</I>
|
|
|
|
<DD>
|
|
Where to measure offset from. Valid values are:
|
|
<P>
|
|
<PRE>
|
|
|
|
0, SET, SEEK_SET seek from the file beginning
|
|
1, CUR, SEEK_CUR seek from the current location
|
|
2, END, SEEK_END seek from the file end
|
|
</PRE>
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="17"><B>Reply</B>
|
|
|
|
<DD>
|
|
<BR>
|
|
|
|
<B>A</B><I>offset</I><B>\n</B>
|
|
|
|
on success. The <I>offset</I> is the new offset in file.
|
|
<DT id="18"><B>Extensions</B>
|
|
|
|
<DD>
|
|
BSD version allows only 0,1,2 as <I>whence</I>.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="19"><B>R</B><I>count</I><B>\n</B>
|
|
|
|
<DD>
|
|
<BR>
|
|
|
|
Read <I>count</I> bytes of data from the current device.
|
|
<DL COMPACT><DT id="20"><DD>
|
|
<DL COMPACT>
|
|
<DT id="21"><B>Arguments</B>
|
|
|
|
<DD>
|
|
<DL COMPACT><DT id="22"><DD>
|
|
<DL COMPACT>
|
|
<DT id="23"><I>count</I>
|
|
|
|
<DD>
|
|
number of bytes to read.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="24"><B>Reply</B>
|
|
|
|
<DD>
|
|
<BR>
|
|
|
|
On success:
|
|
<P>
|
|
|
|
<B>A</B><I>rdcount</I><B>\n</B>
|
|
|
|
|
|
<P>
|
|
followed by <I>rdcount</I> bytes of data read from the device.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="25"><B>W</B><I>count</I><B>\n</B>
|
|
|
|
<DD>
|
|
Writes data onto the current device. The command is followed by
|
|
<I>count</I> bytes of input data.
|
|
<DL COMPACT><DT id="26"><DD>
|
|
<DL COMPACT>
|
|
<DT id="27"><B>Arguments</B>
|
|
|
|
<DD>
|
|
<DL COMPACT><DT id="28"><DD>
|
|
<DL COMPACT>
|
|
<DT id="29"><I>count</I>
|
|
|
|
<DD>
|
|
Number of bytes to write.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="30"><B>Reply</B>
|
|
|
|
<DD>
|
|
<BR>
|
|
|
|
On success: <B>A</B><I>wrcount</I><B>\n</B>, where <I>wrcount</I> is the number of
|
|
bytes actually written.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="31"><B>I</B><I>opcode</I><B>\n</B><I>count</I><B>\n</B>
|
|
|
|
<DD>
|
|
Perform a
|
|
<B>MTIOCOP</B>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ioctl">ioctl</A></B>(2)
|
|
|
|
command with the specified paramedters.
|
|
<DL COMPACT><DT id="32"><DD>
|
|
<DL COMPACT>
|
|
<DT id="33"><B>Arguments</B>
|
|
|
|
<DD>
|
|
<DL COMPACT><DT id="34"><DD>
|
|
<DL COMPACT>
|
|
<DT id="35"><I>opcode</I>
|
|
|
|
<DD>
|
|
<B>MTIOCOP</B>
|
|
|
|
operation code.
|
|
<DT id="36"><I>count</I>
|
|
|
|
<DD>
|
|
mt_count.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="37"><B>Reply</B>
|
|
|
|
<DD>
|
|
<BR>
|
|
|
|
On success: <B>A0\n</B>.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="38"><B>S\n</B>
|
|
|
|
<DD>
|
|
Returns the status of the currently open device, as obtained from a
|
|
<B>MTIOCGET</B>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ioctl">ioctl</A></B>(2)
|
|
|
|
call.
|
|
<DL COMPACT><DT id="39"><DD>
|
|
<DL COMPACT>
|
|
<DT id="40"><B>Arguments</B>
|
|
|
|
<DD>
|
|
<BR>
|
|
|
|
None
|
|
<DT id="41"><B>Reply</B>
|
|
|
|
<DD>
|
|
<BR>
|
|
|
|
On success: <B>A</B><I>count</I><B>\n</B> followed by <I>count</I> bytes of
|
|
data.
|
|
</DL>
|
|
</DL>
|
|
|
|
</DL>
|
|
</DL>
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+tar">tar</A></B>(1).
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
Using this utility as a general-purpose remote file access tool is
|
|
discouraged.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>BUG REPORTS</H2>
|
|
|
|
Report bugs to <<A HREF="mailto:bug-tar@gnu.org">bug-tar@gnu.org</A>>.
|
|
<A NAME="lbAI"> </A>
|
|
<H2>HISTORY</H2>
|
|
|
|
The
|
|
<B>rmt</B>
|
|
|
|
command appeared in 4.2BSD. The GNU
|
|
<B>rmt</B>
|
|
|
|
is written from scratch, using the BSD specification.
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
Copyright © 2013 Free Software Foundation, Inc.
|
|
<BR>
|
|
|
|
|
|
License GPLv3+: GNU GPL version 3 or later <<A HREF="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</A>>
|
|
<BR>
|
|
|
|
|
|
This is free software: you are free to change and redistribute it.
|
|
There is NO WARRANTY, to the extent permitted by law.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="42"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="43"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="44"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="45"><A HREF="#lbAE">COMMANDS</A><DD>
|
|
<DT id="46"><A HREF="#lbAF">SEE ALSO</A><DD>
|
|
<DT id="47"><A HREF="#lbAG">BUGS</A><DD>
|
|
<DT id="48"><A HREF="#lbAH">BUG REPORTS</A><DD>
|
|
<DT id="49"><A HREF="#lbAI">HISTORY</A><DD>
|
|
<DT id="50"><A HREF="#lbAJ">COPYRIGHT</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:15 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|