找回密码
 注册
查看: 731|回复: 2

关于tar的一些问题!

[复制链接]
发表于 2004-10-17 18:00:47 | 显示全部楼层 |阅读模式
不知为什么,我每次安装tar文件总提示有错误
tar zxvf  ***.tar.gz
提示如下;

[root@localhost 输入法]# ls
etc  fcitx-3.0.0.tar  linux.wbxl.tar.gz  readme.txt  test.txt  usr
[root@localhost 输入法]# tar zxvf fcitx-3.0.0.tar

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors


谢谢!![/img][/url]
发表于 2004-10-17 18:09:21 | 显示全部楼层
先用file命令判断一下是什么格式:
[code:1]
$ file fcitx-3.0.0.tar
[/code:1]
然后根据它所给的类型,选用相应的工具来处理。

另外,*.tar格式的文件,应该是这个参数来解压:
[code:1]
$ tar -xf *.tar
[/code:1]
回复

使用道具 举报

发表于 2004-10-17 23:13:42 | 显示全部楼层
写段Shell脚本,以后就不用去判断什么类型的压缩文件,在不用在用不同的方法去解决了,打个脚本命令就可以了,方便多了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2025-2-14 06:19 , Processed in 0.022205 second(s), 15 queries .

© 2001-2025 Discuz! Team. Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表