LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 04-06-2005, 12:21 PM   #1
eeried
Member
 
Registered: Jan 2004
Distribution: Xubuntu Dapper - Debian Etch - Puppy Linux
Posts: 136

Rep: Reputation: 15
Question command tar: - ? gunzip or no ?


Hello,

I'm rather intrigued about the following two points:

1. tar command

Both
Code:
tar -xzvf *tar.gz
and
Code:
tar xzvf *tar.gz
can be found instructions on Web pages?

Which is better - or no - before the xzvf string?

Both seem to work fine (tested with firefox and thunderbird tar.gz files).

2. On the mozilla.org web site (mozilla suite section) they have these instructions for the tar.gz file

Code:
gunzip -dc moz*.tar.gz | tar -xvf -
Is this quite the equivalent of the simpler:
Code:
tar -xzvf *tar.gz
Both seem to have the same effect.

Are there old-fashioned commands or signs that are no longer needed now?



 
Old 04-06-2005, 12:29 PM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
There are so many ways of doing the same thing, so the Mozilla command works the same way as the short one. I have always used the - before zxvf when extracting files so I never knew extraction worked without it.
 
Old 04-06-2005, 12:52 PM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
Just a few years ago, the switch ( - ) was required before the tar options. Tar has been upgraded, and the switch is no longer required; it is now optional.
 
Old 04-06-2005, 01:51 PM   #4
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Quote:
Originally posted by bigrigdriver
Just a few years ago, the switch ( - ) was required before the tar options. Tar has been upgraded, and the switch is no longer required; it is now optional.
In the latest version of tar you don't even need the z or j flag to specify whether the archive is gzip or bzip2 compressed. Just tar xf filename.gz/bz2 will work!
 
Old 04-06-2005, 01:59 PM   #5
eeried
Member
 
Registered: Jan 2004
Distribution: Xubuntu Dapper - Debian Etch - Puppy Linux
Posts: 136

Original Poster
Rep: Reputation: 15
Many thanks all for your replies, and for bringing me up to date.

Cheers,


 
  


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
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 03:48 AM
How to pass protect Gunzip/Tar? LiD Linux - General 3 02-16-2005 05:25 AM
tar command? xmdms Linux - General 4 10-07-2004 02:29 PM
gunzip command ronss Linux - Newbie 3 03-21-2002 01:04 PM
can't do a tar command linda Linux - Newbie 3 05-20-2001 01:00 PM


All times are GMT -5. The time now is 10:31 PM.

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