|RMT(8)||GNU TAR Manual||RMT(8)|
The calling program communicates with rmt 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, rmt returns
where number is an ASCII representation of a decimal return code. Additional data are returned after this line. On error, the following response is returned:
Available commands and possible responses are discussed in detail in the subsequent section.
- Opens the device with given flags. If a device had already
been opened, it is closed before opening the new one.
- The name of the device to open.
- Flags for open(2): 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
- Close the currently open device.
Any arguments are silently ignored.
A0\n on success.
- 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
Aoffset\n on success. The offset is the new offset in file.
- BSD version allows only 0,1,2 as whence.
Read count bytes of data from the current device.
- number of bytes to read.
followed by rdcount bytes of data read from the device.
- Writes data onto the current device. The command is followed by count bytes of input data.
- Number of bytes to write.
On success: Awrcount\n, where wrcount is the number of bytes actually written.
- Perform a MTIOCOP ioctl(2) command with the specified paramedters.
- MTIOCOP operation code.
On success: A0\n.
- Returns the status of the currently open device, as obtained from a MTIOCGET ioctl(2) call.
On success: Acount\n followed by count bytes of data.
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.
|March 24, 2018||RMT|