tar¶
Also see archives
The tar tool is used to create or extract archives.
An archive created with tar is usually called a "tarball."
Creating a Tarball¶
Create a tarball using the tar command with the -czf options.
-czf-c: Creates a new archive.-z: Specify that you want to usegzipto compress it.-f: Specify the output file
./my-project/: The directory you want to create an archive from.
Extracting a Tarball¶
Extract a tarball using tar with the -xzf options.
Note that it's usually a good idea to make a new directory before doing this, as some people will create their archives in such a way that all the files are at the top-level of the archive (no subdirectory). These are referred to as "tarbombs."