LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-02-2011, 04:00 PM   #1
kenholtmeyer
LQ Newbie
 
Registered: Aug 2011
Posts: 7

Rep: Reputation: Disabled
What is the difference between the commands tar -xvf and tar - xzf


What is the difference between the commands tar -xvf and tar -xzf?
 
Old 08-02-2011, 04:03 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
Welcome to LQ. Commands used on Linux have things called "man files". If you open a terminal and type in man tar you will get a listing of all the switches. v = verbose and z instructs tar to use gzip/gunzip.
 
Old 08-02-2011, 04:42 PM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
TIP:
As XavierP said, there's usually a "man page" for everything. For example, from a command line, type:
Quote:
man tar
TIP:
Additionally, many (most?) Linux commands also offer a "-h" or "--help" option. You could also type:
Quote:
tar --help
 
Old 08-02-2011, 05:40 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,362

Rep: Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377
There's a nice searchable HTML version of the man pages here http://linux.die.net/man/
 
Old 08-03-2011, 03:29 PM   #5
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Q: What is the difference between the commands tar -xvf and tar -xzf?
A: One has "v" and the other has "z"

Quote:
Q: What does "v" mean? "z"?
A: Try "man tar" or "tar --help"

Quote:
Q: How do I extract the contents of "myfile.tar"?
A: tar xvf myfile.tar

Quote:
Q: How do I extract the contents of compressed tar file "myfile.tgz"?
A: tar xvzf myfile.tgz

Quote:
Q: Why does "tar xvzf myfile.tgz" work, but "tar xvfz myfile.tgz" doesn't?
A: Because the "-f" argument needs to be next to the "myfile.tgz" argument in order for "tar" to find it.

Last edited by paulsm4; 08-03-2011 at 03:33 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tar tar cvf - . | (cd /root/; tar xvf -) ewt3y Linux - General 10 02-19-2014 10:55 AM
Difference between tar and zip commands. ejaz_nit Linux - Newbie 7 06-30-2011 10:10 PM
"tar -xzf" error: "tar.child died with signal 13" vlsi Linux - General 4 05-26-2009 02:04 AM
tar xvf does nothing and exits with 0 crisostomo_enrico Solaris / OpenSolaris 20 09-20-2007 10:57 AM
Tar xvf I get segmentation fault lvt lists ok Help! Bob Ross Red Hat 0 01-27-2004 10:45 PM


All times are GMT -5. The time now is 08:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration