Tar (computing)
Appearance
tar is a program for creating archives.
tar archives, or tarballs, preserve unix permissions of multiple files or folders.
By default, a .tar file is not compressed. Typically you'll see .tar.gz, or .tgz which denotes a tar file compressed using gzip.
Getting Started
- Extraction
tar xzvf archive.tar.gz
- Archive
tar czpvf archive.tar.gz files
- Flags
-xextract preserving paths-ppreserve permissions-ccreate an archive-fspecify file-Coutput dir
- Compression formats
-zuse gzip-juse bzip2-Juse xz-I pigzuse pigz (parallel gz)
Progress Bar
Tar does not provide a progress bar.
You can get a progress bar by piping tar through pv:
tar cf - $folder | pv -s $(du -sb $folder | awk '{print $1}') | pigz > $folder.tar.gz