18

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.

Suet
  • 199
  • 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: . – 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
  • 5
    i googled it! and i found this question. – Kirt Jul 08 '18 at 08:52

4 Answers4

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
Parto
  • 15,325
  • 24
  • 86
  • 117
  • Here is another one: http://linuxcommand.org/man_pages/tar1.html – Rinzwind Dec 31 '14 at 11:59
  • If you are going to link to online man pages, prefer Ubuntu's: http://manpages.ubuntu.com/tar.1 - you can pick the version as well, so that you and everyone else are on the same page. – muru Dec 31 '14 at 18:07
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.

Ava
  • 41
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.

robsbots
  • 21
  • 3