compress_entire_directory_to_tar_archive
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| compress_entire_directory_to_tar_archive [2017/07/13 07:41] – 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 #db5f0b>Apr 2017</ | + | <color #db5f0b>Jul 2017</ |
| \\ | \\ | ||
| \\ | \\ | ||
| Line 8: | Line 8: | ||
| \\ | \\ | ||
| \\ | \\ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ==== 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.1499931660.txt.gz · Last modified: (external edit)
