1. Tar
Basic usage:
1. Package file: tar-CVF ~ /Test.tar ~ /Test
2. Package and compress the file: tar-zcvf ~ /Test.tar.gz ~ /Test
2. Unpack the file: switch to the directory to which you want to unpack the package, and then run tar-xvf ~ /Test.tar
Parameters:
-C, -- create creates a new archive -X, -- Extract, -- get to Extract files from the archive -T, -- list: List archived content -A, -- catenate, -- concatenate: append the tar file to the archive. -F, -- file = archive use an archive file or an archive Device -V, -- verbose detailed list of processed files -Z, -- gzip, -- gunzip, -- ungzip filter and archive through Gzip 2.zip and unzip
1. Compression:
Zip-r filename.zip file1 file2 file3/usr/work/School
-R processes all subdirectories and files in the specified directory together.
2. decompress:
Decompress test.zip to the user directory: unzip ~ /Test.zip-D ~ /
Parameters:
-V displays detailed information when executing the command.
-O does not need to ask the user first. After unzip is executed, it overwrites the original file.
-N do not overwrite the original file during decompression.
-No information is displayed when Q is executed.