gzip:. GZ, can only compress files, cannot compress directories
gzip Somefiles: The original file is deleted when the compression is complete
-D: Unzip
-#: 1-9, specify compression ratio, default is 6
Gunzip: Decompression
gunzip somefiles.gz: Delete the original compressed file after decompression is complete
Zcat somefiles.gz: View the contents of the text file in the gzip compressed file
bzip2:. bz2, can only compress files, cannot compress directory
A compression tool that has a greater compression ratio than gzip;
bzip2 somefiles: The original file is deleted when the compression is complete
-D: Unzip
-#: 1-9, specify compression ratio, default is 6
-K: Keep the original file when compressing
BUNZIP2: Unzip
bunzip2 somefiles.bz2: Delete the original compressed file after decompression is complete
Bzcat somefiles.bz2: Viewing the contents of a text file within a bz2 compressed file
XZ :. XZ, can only compress files, cannot compress directories
XZ somefiles: The original file is deleted when the compression is complete
-D: Unzip
-#: 1-9, specify compression ratio, default is 6
-K: Keep the original file when compressing
UNXZ: Unzip
unxz somefiles.xz: Delete the original compressed file after decompression is complete
Xzcat somefiles.xz: View text file contents in XZ compressed file
Zip : A tool that is both archived and compressed
zip filename.zip somefiles: Do not delete the original file after compression
Unzip Filename.zip: Unzip
- C : Specify the target path after decompression
Tar : Archive Tool
- C: Create an archive file
-F File.tar: Archived files for Operations
- x: Expand Archive
--xattrs: Preserves extended attribute information for files when archiving
- T: View files directly in tar without expanding the archive
- r: Append file
-ZCF: Archive and invoke gzip compression
-ZXF: Call gzip to unzip and expand Archive,-Z option to omit
-JCF: Archive and call bzip2 compression
-JXF: Call bzip2 to unzip and expand Archive,-Z option to omit
-JCF: Archive and invoke XZ compression
-JXF: Call XZ to unzip and expand Archive,-Z option to omit
Cpio : Archive Tool
-H < backup format;: Specify the file format to use when backing up
--quiet: Does not show how many chunks have been copied
-o: Execute copy-out mode, create backup file
-I : Restore data from a file or device to the system
-D: The directory is automatically created so that no path cannot be found when the restore occurs
C: A relatively new Portableformat-mode storage
-B: Let the preset blocks can be increased to 5120bytes, the default is 512bytes, make backup speed faster
- u: Update to overwrite old files with newer files
-V: Displays the file name in the backup process on the screen
-T: View file or device content created by Cpio
Unzip the Cpio file:
CPIO-IDMV < Filename.cpio
Unzip the img file:
CPIO-IDMV < filename.img
Backup restore:
Backup: Cpio-covb > [file|device] Back up data to a file or device
Restore: Cpio-icduv < [File|device} restores data to the system
Linux compression and archiving tools collation