compress_entire_directory_to_tar_archive
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
compress_entire_directory_to_tar_archive [2017/07/13 08:35] – created walkeradmin | compress_entire_directory_to_tar_archive [2017/07/13 08:48] – walkeradmin | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Compress Entire Directory to tar archive ====== | ====== Compress Entire Directory to tar archive ====== | ||
+ | <color # | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ---- | ||
+ | <color # | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Create .tar File ==== | ||
+ | \\ | ||
+ | The basic syntax for tar is quite simple, here is an example: | ||
+ | \\ | ||
+ | tar -switches xxx.tar.gz ABC | ||
+ | \\ | ||
+ | There are many switches available for .tar, but the main ones we will be using are: | ||
+ | < | ||
+ | p == preserve permissions | ||
+ | c == create archive | ||
+ | v == verbose (print names while making tar) | ||
+ | z == gzip | ||
+ | f == tar file name | ||
+ | </ | ||
+ | \\ | ||
+ | To create a <color # | ||
+ | \\ | ||
+ | tar -pcvzf archive.tar /home/work | ||
+ | \\ | ||
+ | |||
+ | ---- | ||
+ | ==== Decompress .tar File ==== | ||
+ | \\ | ||
+ | To decompress the <color # | ||
+ | \\ | ||
+ | \\ | ||
+ | To decompress the archive.tar file we created earlier, use the following command: | ||
+ | \\ | ||
+ | tar -pcvzf archive.tar | ||
+ | \\ | ||
+ | |||
+ | |||
compress_entire_directory_to_tar_archive.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1