17

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.

3
  • 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, 2014 at 16:13
  • Did you google "What is the purpose of -xvzf arguments when we untar any tarBall file"?
    – Dancrumb
    Dec 31, 2014 at 16:41
  • 4
    i googled it! and i found this question.
    – Kirt
    Jul 8, 2018 at 8:52

4 Answers 4

23

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
6

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.

3

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.

2

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .