Skip to content

Commit

Permalink
Update tar.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove authored Nov 13, 2018
1 parent 4de13a7 commit fa0a1b2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions command/tar.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,15 @@ tar -jcvf log.tar.bz2 log2012.log 打包后,以 bzip2 压缩

在选项`f`之后的文件档名是自己取的,我们习惯上都用 .tar 来作为辨识。 如果加`z`选项,则以.tar.gz或.tgz来代表gzip压缩过的tar包;如果加`j`选项,则以.tar.bz2来作为tar包名。


**解压目录**

去掉第一层目录结构,要出除第二层,--strip-components 2

```bash
tar -xvf portal-web-v2.0.0.tar --strip-components 1 -C 指定目录
```

**查阅上述tar包内有哪些文件**

```
Expand Down

0 comments on commit fa0a1b2

Please sign in to comment.