📄 rmt.8
字号:
.\" Copyright (c) 1983, 1991, 1993.\" The Regents of the University of California. All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\" notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\" notice, this list of conditions and the following disclaimer in the.\" documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\" must display the following acknowledgement:.\" This product includes software developed by the University of.\" California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\" may be used to endorse or promote products derived from this software.\" without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\" @(#)rmt.8 8.2 (Berkeley) 12/11/93.\".Dd December 11, 1993.Dt RMT 8.Os BSD 4.2.Sh NAME.Nm rmt.Nd remote magtape protocol module.Sh SYNOPSIS.Nm rmt.Sh DESCRIPTION.Nm Rmtis a program used by the remote dump and restore programsin manipulating a magnetic tape drive through an interprocesscommunication connection..Nm Rmtis normally started up with an.Xr rexec 3or.Xr rcmd 3call..PpThe .Nm rmtprogram accepts requests specific to the manipulation ofmagnetic tapes, performs the commands, then responds witha status indication. All responses are in.Tn ASCIIand inone of two forms. Successful commands have responses of:.Bd -filled -offset indent.Sm off.Sy A Ar number No \en.Sm on.Ed.Pp.Ar Numberis an.Tn ASCIIrepresentation of a decimal number.Unsuccessful commands are responded to with:.Bd -filled -offset indent.Sm off.Xo Sy E Ar error-number.No \en Ar error-message.No \en.Xc.Sm on.Ed.Pp.Ar Error-numberis one of the possible errornumbers described in.Xr intro 2and.Ar error-messageis the corresponding error string as printedfrom a call to.Xr perror 3 .The protocol is comprised of thefollowing commands, which are sent as indicated - no spaces are suppliedbetween the command and its arguments, or between its arguments, and.Ql \enindicates that a newline should be supplied:.Bl -tag -width Ds.Sm off.It Xo Sy \&O Ar device.No \en Ar mode No \en.XcOpen the specified .Ar deviceusing the indicated.Ar mode ..Ar Deviceis a full pathname and.Ar modeis an.Tn ASCIIrepresentation of a decimalnumber suitable for passing to.Xr open 2 .If a device had already been opened, it isclosed before a new open is performed..It Xo Sy C Ar device No \en.XcClose the currently open device. The.Ar devicespecified is ignored..It Xo Sy L.Ar whence No \en.Ar offset No \en.Xc.Sm onPerform an.Xr lseek 2operation using the specified parameters.The response value is that returned from the.Xr lseekcall..Sm off.It Sy W Ar count No \en.Sm onWrite data onto the open device..Nm Rmtreads.Ar countbytes from the connection, aborting ifa premature end-of-file is encountered.The response value is that returned fromthe.Xr write 2call..Sm off.It Sy R Ar count No \en.Sm onRead.Ar countbytes of data from the open device.If.Ar countexceeds the size of the data buffer (10 kilobytes), it istruncated to the data buffer size..Nm rmtthen performs the requested .Xr read 2and responds with .Sm off.Sy A Ar count-read No \en.Sm onif the read wassuccessful; otherwise an error in thestandard format is returned. If the readwas successful, the data read is then sent..Sm off.It Xo Sy I Ar operation.No \en Ar count No \en.Xc.Sm onPerform a.Dv MTIOCOP.Xr ioctl 2command using the specified parameters.The parameters are interpreted as the.Tn ASCIIrepresentations of the decimal valuesto place in the .Ar mt_opand.Ar mt_countfields of the structure used in the.Xr ioctlcall. The return value is the.Ar countparameter when the operation is successful..It Sy SReturn the status of the open device, asobtained with a.Dv MTIOCGET.Xr ioctlcall. If the operation was successful,an ``ack'' is sent with the size of thestatus buffer, then the status buffer issent (in binary)..El.Sm on.PpAny other command causes .Nm rmtto exit..Sh DIAGNOSTICSAll responses are of the form described above..Sh SEE ALSO.Xr rcmd 3 ,.Xr rexec 3 ,.Xr mtio 4 ,.Xr rdump 8 ,.Xr rrestore 8.Sh BUGSPeople should be discouraged from using this for a remotefile access protocol..Sh HISTORYThe.Nmcommand appeared in.Bx 4.2 .
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -