「tar」- 归档 | 压缩 | 解压 | tape archiver

认识

官网:https://www.gnu.org/software/tar/
文档:https://www.gnu.org/software/tar/manual/
仓库:https://savannah.gnu.org/projects/tar

GNU Tar provides the ability to create tar archives, as well as various other kinds of manipulation. For example, you can use Tar on previously created archives to extract files, to store additional files, or to update or list files which were already stored. 简而言之,Tar,其是个压缩归档工具,其能够创建和加压操作,比较常见常用。

名字的由来?The name “Tar” comes from this use; it stands for tape archiver.

组成

安装的可执行程序

tar | Creates, extracts files from, and lists the contents of archives, also known as tarballs

应用

解压到特定目录(使用 -C 选项):

tar -xf file.name.tar -C /path/to/directory

解压多个文件,需要 for 循环。

将文件解压到当前目录:tar –strip-components=1 …

参考