Redian新闻
>
is it possible to untar files with absolute path?
avatar
is it possible to untar files with absolute path?# Unix - 噫吁兮,危乎高哉
o*l
1
A guy sent me a tar file, but he tar those files with absolute path;
for example, I got below when using tar tvf thetarfile.tar:
-rw-r--r-- 3433 Oct 17 10:06 2002 /home/dude/file1.cpp
-rw-r--r-- 1007 Oct 17 10:06 2002 /home/dude/file2.cpp
-rw-r--r-- 8235 Oct 17 10:06 2002 /home/dude/file3.cpp
Is it possible for me to extract by tar? Since the guy used absolute path,
"tar xvf..." can't succeed as I have no permission to create directories under
home. Is there a workaround? Thanks.
avatar
q*m
2
try to untar it using gnu tar (usually on a Linux machine).
quote:
"For example, if the archive contained a file `/usr/bin/computoy',
GNU tar would extract the file to `usr/bin/computoy', relative
to the current directory. "

【在 o******l 的大作中提到】
: A guy sent me a tar file, but he tar those files with absolute path;
: for example, I got below when using tar tvf thetarfile.tar:
: -rw-r--r-- 3433 Oct 17 10:06 2002 /home/dude/file1.cpp
: -rw-r--r-- 1007 Oct 17 10:06 2002 /home/dude/file2.cpp
: -rw-r--r-- 8235 Oct 17 10:06 2002 /home/dude/file3.cpp
: Is it possible for me to extract by tar? Since the guy used absolute path,
: "tar xvf..." can't succeed as I have no permission to create directories under
: home. Is there a workaround? Thanks.

avatar
o*l
3
It really works. Cool! thanks.

【在 q*****m 的大作中提到】
: try to untar it using gnu tar (usually on a Linux machine).
: quote:
: "For example, if the archive contained a file `/usr/bin/computoy',
: GNU tar would extract the file to `usr/bin/computoy', relative
: to the current directory. "

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。