Working With Tar Compressed Archives in Linux
In Linux, the tar
command is commonly used for archiving and extracting files and directories. Tar archives can be compressed to save space using various compression algorithms like gzip (*.tar.gz
) or bzip2 (*.tar.bz2
). This guide will cover how to create, extract, and work with tar compressed archives in Linux.
Compressing Files and Directories with Tar
1. Create a Tar Archive
To create a tar archive of a folder, use the tar -cvpf
command: