Day 16 #90DaysOfDevops

For day 16, I learnt compressing and archiving. For someone who has only used the windows operating system all my life, to compress files, the default formart is .zip format which combines and compresses files to make them smaller for transferring over the internent or removable media.
The linux way is by using the tar command. E.g tar -cvf Archivedfile file1 file2 file3. From the example, the archiving command is tar, and it can be used with three options. The c option means create, v lists the files that tar is dealing with and f means write to the following file. Then we give the new archive the filename you want to create from the three scripts: Archivedfile.
In full, the command will take all three files and create a single file.
When the three files have been archived into one file, the size of the file becomes bigger than the sum of the original files. That’s where compression comes in, there are methods of compressing files in linux which are gzip, bzip2, compress which can be decompressed accordingly by using the gunzip, bunzip2 and uncompress* commands.
I personally will adopt the compress method as my default method of compression but will use the gzip command when i’m in need of space.
Cheers to day 16 and cheers to many more days!.
Subscribe to my newsletter
Read articles from Odunayo Idowu directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Odunayo Idowu
Odunayo Idowu
Aspiring Devops engineer eager to make an impact.