compress_entire_directory_to_tar_archive
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| compress_entire_directory_to_tar_archive [2017/07/13 07:35] – created walkeradmin | compress_entire_directory_to_tar_archive [2017/07/13 07:48] (current) – 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.1499931322.txt.gz · Last modified: (external edit)
