Archiving and Compressing files with GNU Tar and GNU Zip
Tar Command
TAR is a software application that allows you to "archive," or group several files into one. Gzip, on the other hand, is a programme for compression and decompression. To conserve disc space, we employ file compression techniques. This report provides a summary of how tar and gzip are used:
The complexity of TAR comes from a variety of settings and options that can be used to build and work with archives, not from its basic structure.
We have a tar file called latest-archive.tar, for instance. To extract the contents of the tar file into the currently active working directory, use the command provided below.
[root@Microhost ~]# tar -xf latest.tar
To produce an archive (wordpress.tar.gz) file containing every file in the WordPress directory, run the command below:
[root@Microhost ~]# tar -c wordpress > wordpress.tar.gz
By default, tar sends the contents of archive files to the standard output, where you can utilise them to go on processing the archive you just produced. To avoid default output, choose the -f option. The command that comes after the preceding command is identical:
Read The Full article: Archiving and Compressing files with GNU Tar and GNU Zip