In the image below you can see that the command gzip
was used to compress the file Cat.txt. Upon executing the command, when the directory is listed you can see that the Cat.txt file now has a .gz
destination showing that the file was correctly compressed.
![image](https://private-user-images.githubusercontent.com/137829671/286381981-6850a536-f827-46ed-a359-b2fd6be94d30.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTc5MzUsIm5iZiI6MTczOTU5NzYzNSwicGF0aCI6Ii8xMzc4Mjk2NzEvMjg2MzgxOTgxLTY4NTBhNTM2LWY4MjctNDZlZC1hMzU5LWIyZmQ2YmU5NGQzMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQwNTMzNTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01YTgwNDBiMzcyMzM4N2E0NjU2OTBjMWJkYjk4NTNiNmUyNzg5YzRiMzgyMDhmNWZjNzE3NWY1YjY4MDEyOTNlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.zDnwSLdeeV4koYYw9kh3lRHrv5t7rKGMY2n1EpIVSNg)
In the image below you see that the command gunzip
was to decompress the file Cat.txt.gz. Once the command was executed we listed the contents of the directory where you can now see that the Cat.txt file no longer has the .gz
destination showing that the file has been decompressed.
![image](https://private-user-images.githubusercontent.com/137829671/286383155-efd103c2-99da-43a5-8484-a1d103319e05.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTc5MzUsIm5iZiI6MTczOTU5NzYzNSwicGF0aCI6Ii8xMzc4Mjk2NzEvMjg2MzgzMTU1LWVmZDEwM2MyLTk5ZGEtNDNhNS04NDg0LWExZDEwMzMxOWUwNS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQwNTMzNTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mMWU2YjI0OGU0YWRhOTJhZTNjMGU5NmE3ZDk1ZWYzNjE4YWU2M2NiYmM1N2VmYjMxNDlmNWY3NjMzOTkzODhiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Fo5w28YMYUVu0syqYv1FcBb-Ssf_HiusBjyv8jVPOeU)
In the image below you can see that the command tar
was used to create a compressed archive and compressed multiple files.
In the image below you see that the command tar -xzvf archive.tar.gz
is used to decompress the files and extract the files from the archive.
-x
: Extracts files from an archive.
-z
: Uncompresses the archive using gzip.
-v
: Verbose mode, shows progress in the terminal.
-f archive.tar.gz
: Specifies the archive file to extract from.
![image](https://private-user-images.githubusercontent.com/137829671/286387518-360c43b6-165a-44dd-a465-4cd95f6bf022.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTc5MzUsIm5iZiI6MTczOTU5NzYzNSwicGF0aCI6Ii8xMzc4Mjk2NzEvMjg2Mzg3NTE4LTM2MGM0M2I2LTE2NWEtNDRkZC1hNDY1LTRjZDk1ZjZiZjAyMi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQwNTMzNTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xZDQ3Y2IzMjgyOTYyNzYwYmVlYjk3N2Y0MjU1ZTM4Y2E3NDU3YjRkNjQ4ODVjZDQ3YjhmM2RlZWM1ZmU5OGY0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.8AtyUV_SRgN-P7vlYTzzEqtgYfFdCBYupq91mwhyuNM)