Star Hype News.

Premium celebrity moments with standout appeal.

general

What are the different arguments passed to tar command?

By Daniel Johnston

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

4 Answers

Just type man tar in the terminal for the tar command manual.
You can also view it online at or at (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.

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.

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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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