I present to you a compilation of the most useful Linux commands regarding Packaged and Compressed Files
TAR Files
Show content of TAR file
To view the contents of a .tar file without extracting it.
tar -tf archive.tarCreate TAR file
Generates a TAR file from a directory.
tar -cvf archivo.tar directorio1Create TAR file with multiple files and directories
Allows you to package multiple files and directories into a single TAR file.
tar -cvf archivo.tar archivo1 archivo2 directorio1Create compressed TAR file in bzip2
Generates a compressed TAR file using the bzip2 algorithm.
tar -cvfj archivo.tar.bz2 directorio1Create compressed TAR file in gzip
Creates a TAR file compressed in gzip format.
tar -cvfz archivo.tar.gz directorio1Extract TAR file
Decompresses a TAR file.
tar -xvf archivo.tarExtract TAR file to a specific directory
Extracts the contents of a TAR file to the desired directory.
tar -xvf archivo.tar -C /directorioExtract TAR file preserving user permissions
Extracts a TAR file while preserving user permissions.
tar -xpvf archivo.tarDecompress bzip2 compressed TAR file
Extracts a TAR file that has been compressed with bzip2.
tar -xvfj archivo.tar.bz2Decompress gzip compressed TAR file
Extracts a TAR file compressed in gzip format.
tar -xvfz archivo.tar.gzZIP Files
Create a compressed ZIP file
Generates a ZIP file from a directory.
zip archivo.zip directorio1Compress in ZIP with multiple files and directories
Allows you to package multiple files and directories into a single ZIP file.
zip -r archivo.zip archivo1 archivo2 directorio1Decompress a ZIP file
Extracts the contents of a ZIP file.
unzip archivo.zipBZ2 Files
Compress BZ2 file
Generates a compressed file in BZ2 format.
bzip2 archivoDecompress BZ2 file
Extracts the contents of a BZ2 file.
bunzip2 archivo.bz2GZ Files
Compress GZ file
Generates a compressed file in GZ format.
gzip archivoDecompress GZ file
Extracts the contents of a GZ file.
gunzip archivo.gzDecompress GZ file with maximum compression
Decompresses a GZ file applying the maximum compression.
gzip -9 archivo