4

What is the purpose of -xvzf arguments when we untar any tarBall file and what are the other arguments passed over the command?

I found it mentioned in many books but can't find anything.

  • 6
    This question really fails the minimum effort and usefulness test. We don't need a bunch of different Q: what are the command line options for X, A: <man page for X>. – psusi Dec 31 '14 at 16:13
  • Did you google "What is the purpose of -xvzf arguments when we untar any tarBall file"? – Dancrumb Dec 31 '14 at 16:41
  • 2
    i googled it! and i found this question. – Kirt Jul 8 '18 at 8:52
9

Just type man tar in the terminal for the tar command manual.
You can also view it online at http://man.cx/tar or at http://linuxcommand.org/man_pages/tar1.html (Thanks to @Rinzwind)

The meaning of -xvzf is

-x --extract = extract files from an archive
-v, --verbose = verbosely list files processed
-z, --gzip = gzipped files eg. for tar.gz packages
-f, --file ARCHIVE = use archive file or device ARCHIVE
2

From the tar man page -

-x, --extract, --get

      extract files from an archive

-v, --verbose

      verbosely list files processed

-z, --gzip, --gunzip, --ungzip

      filter the archive through gzip

-f, --file [HOSTNAME:]F

      use archive file or device F (default "-", meaning stdin/stdout)

Type man tar in a Terminal to access the man page for tar.

0

If you are at a linux terminal you can type 'man tar' for the manual page for tar which lists all the command line switches for tar and what they do. You can also google man tar for the same page. (the man pages are great for learning about commands on linux)

-xvzf means :-

x extract - extract the files from the archive

v verbose - list all files as they are processed

z uncompress - in this case, or compress if creating a tar

f use a file (The file you are uncompressing)

....but there are lots more switches for tar. Take a look.

0

As mentioned by previous answers the man page will give you a detailed answer to your question.

Additionally, you can access command information through the help argument in a slightly more concise format than the man page gives. By typing tar --help you can lookup the x, v, z, and f arguments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.