在 UNIX / IBM AIX 中是否有 "view the content of a .tar.Z" 的命令
is there a command to "view the content of a .tar.Z" in UNIX / IBM AIX
(UNIX IBM AIX)
当我恢复环境时,有时我只需要特定目录中的特定文件,因为恢复和解压缩恢复时间太长,我想知道是否有一个命令可以列出恢复的内容,所以至少我会确定文件存在。
现在我只是解压缩还原并等待几个小时,然后获取我需要的文件。
我已经尝试过 wildcards
和 gtar -tvf
uncompress file.tar.Z|tar tvf -
uncompress file.tar.Z|tar xvf - /path/to/file
uncompress file.tar.Z|tar xvf - uncompress file.tar.Z|tar tvf - |grep wildcard
returns 错误 file.tar.Z 不是压缩文件
file file.tar.Z
: 数据或国际语言文本
这个对我有用,但只适用于大小不超过 150g 的文件 gtar xvzf file.tar.Z 路径/
但大部分文件都在900g以上
fsize=-1 上的文件块
到现在还没有结果,但我希望能在你的帮助下找到一些东西
这个命令怎么样?
tar tvfz ...
t
的意思是:不解压直接显示内容
查看此文件内容的命令为:
uncompress file.tar.Z|tar tvf -
要提取特定文件,您可以使用命令:
uncompress file.tar.Z|tar xvf - /path/to/file
请注意,您不能在 UNIX 中使用通配符 tar
如果你想使用通配符,你应该使用类似的东西:
`uncompress file.tar.Z|tar xvf - `uncompress file.tar.Z|tar tvf - |grep `wildcard`
也别忘了更新ulimit
所以
file(blocks) 2097151
表示比您的 tar 文件大的大小。该数字以 512 字节块为单位
(UNIX IBM AIX) 当我恢复环境时,有时我只需要特定目录中的特定文件,因为恢复和解压缩恢复时间太长,我想知道是否有一个命令可以列出恢复的内容,所以至少我会确定文件存在。
现在我只是解压缩还原并等待几个小时,然后获取我需要的文件。
我已经尝试过 wildcards
和 gtar -tvf
uncompress file.tar.Z|tar tvf -
uncompress file.tar.Z|tar xvf - /path/to/file
uncompress file.tar.Z|tar xvf - uncompress file.tar.Z|tar tvf - |grep wildcard
returns 错误 file.tar.Z 不是压缩文件
file file.tar.Z
: 数据或国际语言文本
这个对我有用,但只适用于大小不超过 150g 的文件 gtar xvzf file.tar.Z 路径/ 但大部分文件都在900g以上
fsize=-1 上的文件块
到现在还没有结果,但我希望能在你的帮助下找到一些东西
这个命令怎么样?
tar tvfz ...
t
的意思是:不解压直接显示内容
查看此文件内容的命令为:
uncompress file.tar.Z|tar tvf -
要提取特定文件,您可以使用命令:
uncompress file.tar.Z|tar xvf - /path/to/file
请注意,您不能在 UNIX 中使用通配符 tar
如果你想使用通配符,你应该使用类似的东西:
`uncompress file.tar.Z|tar xvf - `uncompress file.tar.Z|tar tvf - |grep `wildcard`
也别忘了更新ulimit
所以
file(blocks) 2097151
表示比您的 tar 文件大的大小。该数字以 512 字节块为单位