Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hooks/EXAMPLES/SA-permission-tar-001 - add #9

Open
BradleyA opened this issue Sep 4, 2019 · 3 comments
Open

hooks/EXAMPLES/SA-permission-tar-001 - add #9

BradleyA opened this issue Sep 4, 2019 · 3 comments
Assignees
Milestone

Comments

@BradleyA
Copy link
Owner

BradleyA commented Sep 4, 2019

hooks/EXAMPLES/SA-permission-tar-001 - add

 -H, --format FORMAT
       create archive of the given formatFORMAT is one of the following:
       --format=gnu
             GNU tar 1.13.x format
       --format=oldgnu
             GNU format as per tar <= 1.12
       --format=pax
             POSIX 1003.1-2001 (pax) format
       --format=posix
             same as pax
       --format=ustar
             POSIX 1003.1-1988 (ustar) format
       --format=v7
             old V7 tar format
 -j, --bzip2
 -J, --xz
 --lzip
 --lzma
 --lzop
 --old-archive, --portability
       same as --format=v7
 --posix
       same as --format=posix
 -z, --gzip, --gunzip --ungzip
 -Z, --compress, --uncompress
@BradleyA
Copy link
Owner Author

BradleyA commented Sep 6, 2019

Compressing Files at the Shell Prompt

For compressing files you need to use the compression utilities:

bzip2 – tar.bz2 file
gzip – tar.gz file
zip – tar.zip file

To compress the tar file with gzip pass the -z option, run:

$ tar -cvzf docs.tar.gz /home/vivek/Documents/

To compress the tar file with bzip2 pass the -j option, run:

$ tar -cvjf docs.tar.bz2 /home/vivek/Documents/

To list the contents of a tar file, enter:

$ tar -tvf docs.tar
$ tar -tvzf docs.tar.gz
$ tar -tvjf docs.tar.bz2

To extract the contents of a tar file, enter:

$ tar -xvf docs.tar
$ tar -xvzf docs.tar.gz
$ tar -xvjf docs.tar.bz2

@BradleyA
Copy link
Owner Author

BradleyA commented Sep 6, 2019

 $ file  tmp-test-tar-files/* | sort -k2
tmp-test-tar-files/name-that-file-j:             bzip2 compressed data, block size = 900k
tmp-test-tar-files/name-that-file-bzip2:         bzip2 compressed data, block size = 900k
tmp-test-tar-files/name-that-file-uncompress:    empty
tmp-test-tar-files/name-that-file-compress:      empty
tmp-test-tar-files/name-that-file-lzip:          empty
tmp-test-tar-files/name-that-file-lzop:          empty
tmp-test-tar-files/name-that-file-Z:             empty
tmp-test-tar-files/name-that-file-z:             gzip compressed data, last modified: Fri Sep  6 17:48:43 2019, from Unix
tmp-test-tar-files/name-that-file-gzip:          gzip compressed data, last modified: Fri Sep  6 17:49:05 2019, from Unix
tmp-test-tar-files/name-that-file-gunzip:        gzip compressed data, last modified: Fri Sep  6 17:49:18 2019, from Unix
tmp-test-tar-files/name-that-file-ungzip:        gzip compressed data, last modified: Fri Sep  6 17:49:46 2019, from Unix
tmp-test-tar-files/name-that-file-posix:         POSIX tar archive
tmp-test-tar-files/name-that-file-format-pax:    POSIX tar archive
tmp-test-tar-files/name-that-file-format-posix:  POSIX tar archive
tmp-test-tar-files/name-that-file-format-ustar:  POSIX tar archive
tmp-test-tar-files/name-that-file-default:       POSIX tar archive (GNU)
tmp-test-tar-files/name-that-file-format-gnu:    POSIX tar archive (GNU)
tmp-test-tar-files/name-that-file-format-oldgnu: POSIX tar archive (GNU)
tmp-test-tar-files/name-that-file-format-v7:     tar archive
tmp-test-tar-files/name-that-file-old-archive:   tar archive
tmp-test-tar-files/name-that-file-portability:   tar archive
tmp-test-tar-files/name-that-file-J:             XZ compressed data
tmp-test-tar-files/name-that-file-xz:            XZ compressed data
tmp-test-tar-files/name-that-file-lzma:          XZ compressed data

@BradleyA
Copy link
Owner Author

BradleyA commented Sep 7, 2019

SA-type-tar-archive-001
SA-type-tar-gzip-001
SA-type-tar-POSIX-archive-001
SA-type-tar-POSIX-archive-GNU-001
SA-type-tar-V7-001
SA-type-tar-XZ-001

@BradleyA BradleyA added this to the release 3.1.0 milestone Oct 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant