Skip to content

Commit 71951e4

Browse files
committed
Ch03: tar combination before example
1 parent 8c8059e commit 71951e4

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/Ch03/index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,16 @@ $ tar [OPTIONS] FILE...
861861
| `--zstd` | 使用 zstd 算法处理存档文件 |
862862
| `-a`, `--auto-compress` | 通过后缀自动选择压缩算法(**推荐**|
863863

864+
!!! tip "组合 tar 的选项"
865+
866+
与大部分 Linux 命令相同,tar 命令允许将多个单字母(使用单个 `-` 符号的)选项组合为一个参数,便于用户输入。例如,以下命令是等价的:
867+
868+
```console
869+
$ tar -c -z -v -f target.tar.gz test/
870+
$ tar -czvf target.tar.gz test/
871+
$ tar -f target.tar.gz -czv test/
872+
```
873+
864874
!!! example "tar 使用实例"
865875

866876
* 将 `file1`、`file2`、`file3` 打包为 `target.tar`:
@@ -912,16 +922,6 @@ $ tar [OPTIONS] FILE...
912922
$ tar tvf target.tar
913923
```
914924

915-
!!! tip "组合 tar 的选项"
916-
917-
与大部分 Linux 命令相同,tar 命令允许将多个单字母(使用单个 `-` 符号的)选项组合为一个参数,便于用户输入。例如,以下命令是等价的:
918-
919-
```console
920-
$ tar -c -z -v -f target.tar.gz test/
921-
$ tar -czvf target.tar.gz test/
922-
$ tar -f target.tar.gz -czv test/
923-
```
924-
925925
!!! tip "存档文件的后缀名"
926926

927927
后缀名并不能决定文件类型,但后缀名通常用于帮助人们辨认这个文件的可能文件类型,从而选择合适的打开方法。

0 commit comments

Comments
 (0)