我收到了一盘写入了内容的 LTO3,但我不知道它是如何制作的。我被赋予了一项任务,即找出磁带上实际存储的内容。我尝试了常用的 tar 命令,但错误表明磁带不是使用 tar 写入的。有什么最简单的方法可以让我找出磁带上的内容类型?我对这些都很陌生,因此希望您能一步一步地说明!提前致谢!
我使用了以下命令:
这是尝试获取内容列表 - Input1:
dd if=/dev/nst0 bs=256k skip=1 | /bin/tar -tf - > file.txt
输出 1:
dd: ‘/dev/nst0’: cannot skip to specified offset
dd: warning: partial read (65536 bytes); suggest iflag=fullblock
/bin/tar: This does not look like a tar archive
/bin/tar: Skipping to next header
dd: error reading ‘/dev/nst0’: Input/output error
0+357469 records in
0+357469 records out
23427088384 bytes (23 GB) copied, 260.175 s, 90.0 MB/s
/bin/tar: Exiting with failure status due to previous errors
输入 2:
tar -b 512 -tf /dev/st0 > file.txt
输出 2:
tar: Record size = 128 blocks
tar: This does not look like a tar archive
tar: Skipping to next header
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: Too many errors, quitting
tar: Error is not recoverable: exiting now
尝试提取:
输入 3:
tar -b 512 -xvf /dev/nst0
输出 3:
tar: /dev/nst0: Cannot read: Input/output error
tar: At beginning of tape, quitting now
tar: Error is not recoverable: exiting now
我现在尝试将一些内容添加到文件中:
输入 4:
dd if=/dev/nst0 of=file.dat bs=8k count=1
输出 4:
dd: error reading ‘/dev/nst0’: Cannot allocate memory
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000700687 s, 0.0 kB/s
答案1
我只需将第一个 8k 添加到文件中dd if=/dev/nst0 of=file.dat bs=8k count=1
,然后使用文件、字符串、十六进制转储、od 或其他东西来检查内容。也许有一些标题信息会告诉您使用什么来写入磁带。否则它几乎可以是任何东西,并且以您可以使用的方式获取信息可能非常不可能。