← 返回命令列表

Linux command

mt 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

mt -f [/dev/nst0] status

Rewind

mt -f [/dev/nst0] rewind

Forward space

mt -f [/dev/nst0] fsf [count]

Rewind and position

mt -f [/dev/nst0] asf [count]

Example

mt -f [/dev/nst0] eod

Rewind and eject

mt -f [/dev/nst0] eject

Example

mt -f [/dev/nst0] eof

说明

mt controls magnetic tape drive operations, commonly used with LTO (Linear Tape-Open) and other SCSI tape drives. It provides commands for positioning, rewinding, ejecting, and writing control marks on tape media. The device is specified with -f option or via the TAPE environment variable. Use /dev/nstX for non-rewinding devices (preserves position after operations) or /dev/stX for auto-rewinding devices.

参数

-f _device_, -t _device_
Specify tape device (e.g., /dev/nst0, /dev/st0)
-h
List available commands
-V, --version
Display version information

FAQ

What is the mt command used for?

mt controls magnetic tape drive operations, commonly used with LTO (Linear Tape-Open) and other SCSI tape drives. It provides commands for positioning, rewinding, ejecting, and writing control marks on tape media. The device is specified with -f option or via the TAPE environment variable. Use /dev/nstX for non-rewinding devices (preserves position after operations) or /dev/stX for auto-rewinding devices.

How do I run a basic mt example?

Run `mt -f [/dev/nst0] status` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -f _device_, -t _device_ do in mt?

Specify tape device (e.g., /dev/nst0, /dev/st0)