A collection of guides and tutorials for various topics that I have written.
Tape archive is a file format used to archive folders.
tar <option> <file>
-r
or --append
tar -rvf archive.tar file.txt
-c
or --create
tar -cvf archive.tar file.txt
-x
or --extract
or --get
tar -xvf archive.tar
-t
or --list
tar -tvf archive.tar
-u
or --update
tar -uvf archive.tar file.txt
Tar can be used with compression tools like gzip
or bzip2
.
-z
or --gzip
tar -czf archive.tar.gz file.txt
-j
or --bzip2
tar -cjf archive.tar.bz2 file.txt
-J
or --xz
tar -cJf archive.tar.xz file.txt
-f
or --file
tar -cf archive.tar file.txt
-v
or --verbose
tar -cvf archive.tar file.txt
-C
or --directory
tar -cvf archive.tar -C /path/to/directory .
tar -cvf archive.tar *.txt
--exclude
tar -cvf archive.tar --exclude='*.txt' .