现在的位置: 首页 > 综合 > 正文

tar:time stamp in the future

2013年06月19日 ⁄ 综合 ⁄ 共 475字 ⁄ 字号 评论关闭

如果解压一个拷贝自一个系统时间在当前系统之后的 包,会提示如题目这样。

tar: openssl-1.0.1e/apps/openssl.cnf: time stamp 2013-12-31 15:26:04 is 1360584537.139999998 s in the future
openssl-1.0.1e/apps/openssl-vms.cnf
tar: openssl-1.0.1e/apps/openssl-vms.cnf: time stamp 2013-12-31 15:26:04 is 1360584537.129999998 s in the future
openssl-1.0.1e/apps/passwd.c

可以用 -m参数来把文件的时间(modify time)设置为当前系统的时间。

tar  zxmvf openssl-1.0.1e.tar.gz

还有一种方法是解压后修改每个文件的时间:

mkdir foo
mv openssl-1.0.1e.tar.gz foo/
cd foo/
tar xvvzf openssl-1.0.1e.tar.gz
find . -exec touch -am '{}' \;

抱歉!评论已关闭.