【发布时间】:2014-02-19 08:34:26
【问题描述】:
假设一个 tar 文件具有以下布局
$ tar -xvf test.tar -C test ./one/two/three
./one/two/three/
./one/two/three/four/
./one/two/three/four/file00.txt
./one/two/three/four/file01.txt
./one/two/three/four/file02.txt
./one/two/three/four/file03.txt
./one/two/three/four/file04.txt
./one/two/three/four/file05.txt
是否可以只提取名为“four”的目录,并且它的内容是指定的目录。 但是目录 four 应该在提到的输出目录的直接位置。
$ tar -xvf test.tar -C test one/two/three
我已尝试上述方法,但输出目录 test 包含目录四的所有文件夹层次结构。
【问题讨论】:
-
不可能一蹴而就;您需要
mv所需的目录。 -
是的,我也这么认为...