We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4de13a7 commit fa0a1b2Copy full SHA for fa0a1b2
1 file changed
command/tar.md
@@ -182,6 +182,15 @@ tar -jcvf log.tar.bz2 log2012.log 打包后,以 bzip2 压缩
182
183
在选项`f`之后的文件档名是自己取的,我们习惯上都用 .tar 来作为辨识。 如果加`z`选项,则以.tar.gz或.tgz来代表gzip压缩过的tar包;如果加`j`选项,则以.tar.bz2来作为tar包名。
184
185
+
186
+**解压目录**
187
188
+去掉第一层目录结构,要出除第二层,--strip-components 2
189
190
+```bash
191
+tar -xvf portal-web-v2.0.0.tar --strip-components 1 -C 指定目录
192
+```
193
194
**查阅上述tar包内有哪些文件** :
195
196
```
0 commit comments