Create, inspect and extract compressed archives quickly on the command line. 17.11.2025 | reading time: 2 min Tar bundles files and can compress them in one step; it is the standard archiver on Unix-like systems and a core skill for any Linux enthusiast. A practical example Create two files and archive them with gzip in one line: ```echo hello > file1.txt; echo world > file2.txt; tar -cvzf project.tar.gz file1.txt file2.txt``` The command prints the files as it runs, inspect the archive with: ```tar -tvzf project.tar.gz``` and extract into a directory with: ```mkdir extract && tar -xvzf project.tar.gz -C extract``` Powerful options to know Use -c to create, -x to extract and -t to list; pair -f with the archive name and -v for verbose output; add -z for gzip, -j for bzip2 or -J for xz compression, and use --exclude to skip paths or -C to change directory before operating; for large jobs consider piping with `tar -cf - dir | gzip -9 > archive.tar.gz` or using --listed-incremental for incremental backups. When tar meets other tools Tar is an archiver, not a compressor, so it is commonly combined with gzip, bzip2 or xz; parallel compressors like pigz speed up gzip; rsync complements tar for remote and incremental transfers; zip/unzip offer alternative single-file compressed archives. Next steps Try creating archives with different compressors and options, practice extracting and preserving permissions, and if certs are the goal consider CompTIA Linux+ or LPIC-1; bitsandbytes.academy is an intensive exam preparation resource to explore. Join Bits & Bytes Academy First class LINUX exam preparation. backup utilities storage filesystem scripting