Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Tar packing

Shulou Source: shulou.com Published: 2022-06-01 04:13:50 09月29日 Update

Tar command

Tar packing

Tar-cvf packaged file name .tar + file name + directory name

"- c": create a tar package or zip file package

"- v": visualization

"- f": followed by the file name, and compressed with "- f file name", which means the compressed file name is filename

Unzip it with "- f file name", which means to extract filename. Please note that if it is a combination of multiple parameters

With "- f", please write "- f" at the end.

Tar-cvf packaged file name.tar + filename + directory name-exclude + filename + directory name

-- exclude filters out the files or directories in the packaged file without packaging

Tar packet search

Tar-tf packaged files to see which files are made up of packaged files

"- t": view the files in the tar package

Tar unpacking

Tar-xvf packaged file

"- x": unpack or decompress

Tar-C path-xvf packaged Fil

"- C": specify the save path of the unpacked file

Tar packaging and compression

Tar-zcvf compressed file name .tar.gz + file name + directory name

"- z": gzip compression at the same time

Tar-jcvf compressed file name .tar.bz2 + file name + directory name

"- j": bzip2 compression at the same time

Tar-Jcvf compressed file name .tar.xz + file name + directory name

"- J": use xz compression at the same time

* * Special column: view files in tar-tJf xz package * *

Tar unpacking and decompression

Tar-zxvf .tar.gz packaged zip file

Tar-jxvf .tar.bz2 packaged zip file

Tar-Jxvf .tar.xz packaged zip file

Tags: File file name directory directory name simultaneously name meaning path parameter command multiple case package visualization reconciliation combination Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Shulou Information macOS Shulou Technology Docker