Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

tar -zxvf syslinux-3.86.tar.gz

Posted on 2011-02-17
6
Medium Priority
?
915 Views
Last Modified: 2012-06-27
what is purpose of tar, and what are alternatives

tar -zxvf syslinux-3.86.tar.gz

what will above command do ?
0
Comment
Question by:aashee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 20

Expert Comment

by:simon3270
ID: 34915625
The above command will make the /usr/src/redhat/SPECS directory, creating any directories required (e.g. if /usr/src exists but /usr/src/redhat doesn't, it will create /usr/src/redhat then create /usr/src/redhat/SPECS)

The flag is -p, not -P.

With "-p" there is no error if the directory already exists (without "-p", mkdir will print an error message if the directory already exists).
0
 
LVL 5

Expert Comment

by:sreedhar2u
ID: 34915658
tar is an archiving utility which stores files from a tape or disk archive

-z to unzip the .gz extension files
-x to extract files from an archive
-v to verbosely list files processed
-f use an archive file

tar is like a winzip in windows.
0
 
LVL 20

Accepted Solution

by:
simon3270 earned 2000 total points
ID: 34915695
Oops, wrong question!

As for the above question, 2tar" is an archiver - it collects multiple files within one archive file, so that the single file can be backed up, or copied to anoter machine.  Later on, individual files within the archive, or the entire archive, can be extract to the same place on the same machine, in a different place on the same machine, or on a different machine.

Alternatives are cpio and zip.  cpio is more efficient at saving small files than tar, and allows more flexibilty in selecting the list of files to be archived.  zip is portable (to a certain extent) between UNIX and Windows.

As for the above command, it will extract all files from the syslinux-3.86.tar.gz archive file, using the same directory structure as when the archive was created.  The "z" flag tells tar that the archive is compressed with gzip (it would be "j" for archives compressed with bzip2).  "x" tells it to extract the files (as opposed to "c" when creating archives, or "t" when checking the validity of an archive file). "v" tells tar to list out the names of files as it extracts them.  "f" tells tar that the folowing word on the command line is the name of the archive to be processed.
0
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
LVL 12

Expert Comment

by:upanwar
ID: 34916152
"man tar" would be the great help.
0
 

Author Comment

by:aashee
ID: 34916303
thanks a lot for u guys.

how can we find out that archive was compressed with bizp2 and to use j option not the z ?
0
 
LVL 20

Expert Comment

by:simon3270
ID: 34916754
You might be able to tell from the filename - if it ends .tar.bz2, then it was probably bzip2, but there is no guarantee.  The person creating the file can call it whatever they want!

Your best bet is
file syslinux-3.86.tar.gz

Open in new window

this might return:
syslinux.tar.bz2: bzip2 compressed data, block size = 900k
syslinux.tar.tgz: gzip compressed data
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Fine Tune your automatic Updates for Ubuntu / Debian
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question