wwwwwllllk 发表于 2022-10-23 11:09:26

好奇tar的解压为什么不是e而是x

一直记不住
tar -xzvf   // 解压
tar -czvf   //打包压缩

解压是extract为什么它用x缩写表示呢

王一之 发表于 2022-10-23 11:09:27

```
tar -h                  
tar(bsdtar): manipulate archive files
First option must be a mode specifier:
-c Create-r Add/Replace-t List-u Update-x Extract
Common Options:
-b #Use # 512-byte records per I/O block
-f <filename>Location of archive
-v    Verbose
-w    Interactive
Create: tar -c [<file> | <dir> | @<archive> | -C <dir> ]
<file>, <dir>add these items to archive
-z, -j, -J, --lzmaCompress archive with gzip/bzip2/xz/lzma
--format {ustar|pax|cpio|shar}Select archive format
--exclude <pattern>Skip files that match pattern
-C <dir>Change to <dir> before processing remaining files
@<archive>Add entries from <archive> to output
List: tar -t [<patterns>]
<patterns>If specified, list only entries that match
Extract: tar -x [<patterns>]
<patterns>If specified, extract only entries that match
-k    Keep (don't overwrite) existing files
-m    Don't restore modification times
-O    Write entries to stdout, don't restore to disk
-p    Restore permissions (including ACLs, owner, file flags)
bsdtar 3.5.1 - libarchive 3.5.1 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8

// linux中的help
-x, --extract, --get       extract files from an archive
```

-x Extract

至于为什么。。。这个就要问问作者了,可能-e歧义更多?-e(export,exclude)

朱焱伟 发表于 2022-10-23 13:21:46

我也好奇为什么xvideos以x开头{:4_102:}

脚本体验师001 发表于 2022-10-23 13:33:17

也可能和xxoo有关,解压的时候重点在于X而不是O。反之压缩的时候,O迫不及待的要吞掉一切,于是张开了嘴,于是变成了C

王一之 发表于 2022-10-23 13:46:38

朱焱伟 发表于 2022-10-23 13:21
我也好奇为什么xvideos以x开头

这路也能开啊

wwwwwllllk 发表于 2022-10-23 14:10:46

脚本体验师001 发表于 2022-10-23 13:33
也可能和xxoo有关,解压的时候重点在于X而不是O。反之压缩的时候,O迫不及待的要吞掉一切,于是张开了嘴, ...

c是create可以理解,主要是我死记记不住,每次都得查一下笔记。关键有的服务器不能用unzip

李恒道 发表于 2022-10-23 15:23:52

王一之 发表于 2022-10-23 11:09
```
tar -h                  
tar(bsdtar): manipulate archive files


exciting!
页: [1]
查看完整版本: 好奇tar的解压为什么不是e而是x