o******l 发帖数: 828 | 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. | q*****m 发帖数: 73 | 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.
| o******l 发帖数: 828 | 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. "
|
|