info > rmt(8)

📜 NAME

rmt - remote magnetic tape server

🚀 Quick Reference

Use CaseCommandDescription
đŸ—„ī¸ Open remote deviceOdevice\nflags\nOpen a device with given flags
🔒 Close deviceC[device]\nClose the currently open device
📏 Seek on deviceLwhence\noffset\nPerform lseek(2) operation
📖 Read from deviceRcount\nRead count bytes of data
âœī¸ Write to deviceWcount\n + dataWrite count bytes of data
âš™ī¸ IOCTL operationIopcode\ncount\nPerform MTIOCOP ioctl(2)
📊 Get device statusS\nReturn status from MTIOCGET ioctl

📋 SYNOPSIS

rmt

📖 DESCRIPTION

rmt provides remote access to files and devices for tar(1), cpio(1), and similar backup utilities. It is normally called by running rsh(1) or ssh(1) 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 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:

Anumber\n

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:

Eerrno\nerror-message\n

where errno is one of the system error codes, as described in errno(3), and error-message is a one-line human-readable description of the error, as printed by perror(3).

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

đŸ› ī¸ COMMANDS

🔧 O – Open Device

Odevice\nflags\n

Opens the device with given flags. If a device had already been opened, it is closed before opening the new one.

đŸ“Ĩ Arguments

📤 Reply

A0\n on success.

🔗 Extensions

BSD version allows only decimal number as flags.

🔧 C – Close Device

C[device]\n

Close the currently open device.

đŸ“Ĩ Arguments

Any arguments are silently ignored.

📤 Reply

A0\n on success.

🔧 L – Seek on Device

Lwhence\noffset\n

Performs an lseek(2) on the currently open device with the specified parameters.

đŸ“Ĩ Arguments

📤 Reply

Aoffset\n on success. The offset is the new offset in file.

🔗 Extensions

BSD version allows only 0, 1, 2 as whence.

🔧 R – Read from Device

Rcount\n

Read count bytes of data from the current device.

đŸ“Ĩ Arguments

📤 Reply

On success:

Ardcount\n

followed by rdcount bytes of data read from the device.

🔧 W – Write to Device

Wcount\n

Writes data onto the current device. The command is followed by count bytes of input data.

đŸ“Ĩ Arguments

📤 Reply

On success: Awrcount\n, where wrcount is the number of bytes actually written.

🔧 I – IOCTL Operation

Iopcode\ncount\n

Perform a MTIOCOP ioctl(2) command with the specified parameters.

đŸ“Ĩ Arguments

📤 Reply

A0\n on success.

🔧 S – Get Device Status

S\n

Returns the status of the currently open device, as obtained from a MTIOCGET ioctl(2) call.

đŸ“Ĩ Arguments

None

📤 Reply

On success: Acount\n followed by count bytes of data.

📚 SEE ALSO

tar(1).

🐛 BUGS

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

đŸ“Ŧ BUG REPORTS

Report bugs to bug-tar AT gnu.org.

đŸ•°ī¸ HISTORY

The rmt command appeared in 4.2BSD. The GNU rmt is written from scratch, using the BSD specification.

ÂŠī¸ COPYRIGHT

Copyright (C) 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(8)
📜 NAME 🚀 Quick Reference 📋 SYNOPSIS 📖 DESCRIPTION đŸ› ī¸ COMMANDS
🔧 O – Open Device 🔧 C – Close Device 🔧 L – Seek on Device 🔧 R – Read from Device 🔧 W – Write to Device 🔧 I – IOCTL Operation 🔧 S – Get Device Status
📚 SEE ALSO 🐛 BUGS đŸ“Ŧ BUG REPORTS đŸ•°ī¸ HISTORY ÂŠī¸ COPYRIGHT

Generated by phpman v4.9.26-5-g7740029 Author: Che Dong Under GNU General Public License
2026-08-26 08:56 @216.73.217.127
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!