# rmt-tar(8) - man - phpMan

[RMT(8)](https://www.chedong.com/phpMan.php/man/RMT/8/markdown)                                     GNU TAR Manual                                     [RMT(8)](https://www.chedong.com/phpMan.php/man/RMT/8/markdown)



## NAME
       rmt - remote magnetic tape server

## SYNOPSIS
### rmt

## DESCRIPTION
       **Rmt** provides remote access to files and devices for [**tar**(1)](https://www.chedong.com/phpMan.php/man/tar/1/markdown), [**cpio**(1)](https://www.chedong.com/phpMan.php/man/cpio/1/markdown), and similar backup util‐
       ities.  It is normally called by running [**rsh**(1)](https://www.chedong.com/phpMan.php/man/rsh/1/markdown) or [**ssh**(1)](https://www.chedong.com/phpMan.php/man/ssh/1/markdown) to the remote  machine,  optionally
       using a different login name if one is supplied.

       The calling program communicates with **rmt** by sending requests on its standard input and read‐
       ing 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, **rmt** returns

           **A**_number_**\n**

       where _number_ is an ASCII representation of a decimal return code.  Additional  data  are  re‐
       turned after this line.  On error, the following response is returned:

           **E**_errno_**\n**_error-message_**\n**

       where  _errno_ is one of the system error codes, as described in [**errno**(3)](https://www.chedong.com/phpMan.php/man/errno/3/markdown), and _error-message_ is
       a one-line human-readable description of the error, as printed by [**perror**(3)](https://www.chedong.com/phpMan.php/man/perror/3/markdown).

       Available commands and possible responses are discussed in detail in the subsequent section.

## COMMANDS
       **O**_device_**\n**_flags_**\n**
              Opens the _device_ with given _flags_. If a device had already been opened, it  is  closed
              before opening the new one.

              **Arguments**

              _device_ The name of the device to open.

              _flags_  Flags  for  [**open**(2)](https://www.chedong.com/phpMan.php/man/open/2/markdown):  a  decimal number, or any valid **O**___***** constant from **fcntl.h**
                     (the initial **O**___ may be omitted), or a bitwise or (using **|**)  of  any  number  of
                     these, e.g.:
                         576
                         64|512
                         CREAT|TRUNC
                     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.

              **Reply**
                     **A0\n** on success.

              **Extensions**
                     BSD version allows only decimal number as _flags_.

       **C**[_device_]**\n**
              Close the currently open device.

              **Arguments**
                     Any arguments are silently ignored.

              **Reply**
                     **A0\n** on success.

       **L**_whence_**\n**_offset_**\n**
              Performs an [**lseek**(2)](https://www.chedong.com/phpMan.php/man/lseek/2/markdown) on the currently open device with the specified parameters.

              **Arguments**

                     _whence_ Where to measure offset from. Valid values are:

                             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

              **Reply**
                     **A**_offset_**\n** on success. The _offset_ is the new offset in file.

              **Extensions**
                     BSD version allows only 0,1,2 as _whence_.

       **R**_count_**\n**
              Read _count_ bytes of data from the current device.

              **Arguments**

                     _count_  number of bytes to read.

              **Reply**
                     On success:

                         **A**_rdcount_**\n**

                     followed by _rdcount_ bytes of data read from the device.

       **W**_count_**\n**
              Writes  data onto the current device.  The command is followed by _count_ bytes of input
              data.

              **Arguments**

                     _count_  Number of bytes to write.

              **Reply**
                     On success: **A**_wrcount_**\n**, where _wrcount_ is the number of bytes actually written.

       **I**_opcode_**\n**_count_**\n**
              Perform a **MTIOCOP** [**ioctl**(2)](https://www.chedong.com/phpMan.php/man/ioctl/2/markdown) command with the specified paramedters.

              **Arguments**

                     _opcode_ **MTIOCOP** operation code.

                     _count_  mt_count.

              **Reply**
                     On success: **A0\n**.

       **S\n**    Returns the status of the currently open device, as obtained from a **MTIOCGET**  [**ioctl**(2)](https://www.chedong.com/phpMan.php/man/ioctl/2/markdown)
              call.

              **Arguments**
                     None

              **Reply**
                     On success: **A**_count_**\n** followed by _count_ bytes of data.

## SEE ALSO
       [**tar**(1)](https://www.chedong.com/phpMan.php/man/tar/1/markdown).

## BUGS
       Using this utility as a general-purpose remote file access tool is discouraged.

## BUG REPORTS
       Report bugs to <<bug-tar@gnu.org>>.

## HISTORY
       The **rmt** command appeared in 4.2BSD.  The GNU **rmt** is written from scratch, using the BSD spec‐
       ification.

## COPYRIGHT
       Copyright © 2013, 2018 Free Software Foundation, Inc.
       License GPLv3+: GNU GPL version 3 or later <<http://gnu.org/licenses/gpl.html>>
       This is free software: you are free to change and redistribute it.  There is NO WARRANTY,  to
       the extent permitted by law.



RMT                                        March 24, 2018                                     [RMT(8)](https://www.chedong.com/phpMan.php/man/RMT/8/markdown)
