 | Junior Member with 6 posts. | | Join Date: Apr 2003 Location: Nottingham England | | What Can I do with a tar.gz file ???? Hello everyone.
I am a complete newcomer to linux .Can someone help me Please
This week I have installed Redhat 9.0 and it is up and running in a simple fashion & realise that I have a LOT to learn.
I have created a folder on the desktop to put downloaded files into, some of the files are in the rpm format and I can use them, however I also have some files in the tar.gz format and I really dont have a clue on how to change them to some other format that I can use.
I thought that they would be like a zip in windowze but they are not.
Is there some programme or some way to change them??
Can someone help me PLEASE before I go bald Hee-Hee
Thank you
................................Pat ................................
byeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee | | Moderator - Gone, but never forgotten with 48,307 posts. | | Join Date: Jun 2001 Location: Great White North (WI) Experience: Getting somewhere I hope | | I was sure I had some info for you in my UNIX and Linux notes, but a search isn't finding anything.
Sooo....going by memory, I think it's a zip format. I can't remember what you are supposed to use to open it, but I'll dig some more.
Someone else is sure to know too. | | Senior Member with 638 posts. | | Join Date: Nov 2000 Location: MI | | you can extract it
It is a gzipped tar file.
tar xvzf filename.tar.gz (I think...man tar for details) | | Moderator - Gone, but never forgotten with 48,307 posts. | | Join Date: Jun 2001 Location: Great White North (WI) Experience: Getting somewhere I hope | | You may be sorry I did this, but here is someting from my notes. PHP Code: [b]
There are many ways you can do this, one of the most popular methods is to use the tar utility.
The name tar stands for Tape Archive, as this utility originally used to tape to archive backup files.
Tar is no longer confined to archiving to tape, and it is now used with floppy disks and files downloaded from the Internet.
There are a number of options you can use with tar.
In this example, you can see the syntax of the tar command using the "c" option, which creates a new archive.
tar c <filename>
The following funtions are available with the tar command:
c creates new archive
x extracts files from an archive
r adds files to the end of an archive
t lists the names of files in an archive
d compares the files in the archive to the files in the filesystem
u updates files that are newer than the files in the archive
The "t" option shown here, allows you to interrogate an archive.
tar t <filename>
And "x" extracts a file from as archive, using the syntax shown here.
tar x <filename>
There are other options that you can use with tar, such as "v", which prints verbose information on processed files.
tar v <filenames>
The "k" option prevents you from overwritine files contained in the tar file.
tar k <filenames>
This option identifies the name of the tar file to which files are to be stored and from which they are to be extracted.
f <filenames>
Say Brad Clemente has resigned, so you want to archive the directory /home/bradc, and back it up to tape.
You want to create a temporary archive in the location /var/tmp, and you want its tar filename to be brad.tar.
/var/tmp/brad.tar
To do this, you type:
tar cvf/var/tmp/brad.tar /home/bradc
Then press ENTER.
When you use the "v" option with the tar command, each file in the directory is listed as it is archived.
You can see what is contained in the brad.tar tar file by typing
tar tvf /var/tmp/brad.tar.
This command lists the contents of the archive.
[root@amber /root]# tar tvf /var/tmp/brad.tar
Say you receive a tape with the tar file reports.tar on it.
You want to extract this file, so first you copy the file from the tape to any directory - in this case the /oldarch directory.
By interrogating the file using the "t" function, you can see that this tarfile contains the contents of a directory called data.
tar t <options><filename>
To extract the reports.tar archive, you enter tar xvf reports.tar from the directory /oldarch, so that it is extracted to that location.
[root@amber /oldarch]# tar xvf reports.tar
Extracting the tarfile creates a subdirectory within the /oldarch directory.
The directory is data - the directory that is contained in the archive.
drwxr-xr-x 2 andread andread 1024 Sep 16 18:15 data
To access the contents of the extracted reports.tar file, you must change directories to data.
[root@amber /oldarch]# cd data
This directory is a subdiresctory of /oldarch, so the pathname for the extracted files is /oldarch/data/<filename>
If you want to extract reports.tar to a different directory, you change directory to where you want the file extracted and enter:
tar xvf/oldarch/reports.tar
This command allows you to extract specific files from an archive.
tar xvf <tarfile><files>
If you want to extract just the file march.txt from the archived tarfile brad.tar, you would enter:
tar xvf brad.tar home/bradc/march.txt
And you can then see, only the file march.txt is extracted from the archive.
The tar utility is easy to use, and very reliable.
You can read tar files from almost all Linux and UNIX systems.
Although tar is a popular archiving utility, it does have some disadvantages.
With certain versions the archive must reside on one volume, such as a single disk or tape.
This is a limitation, and in a sense it governs when you can and cannot use tar to carry out an archiving request.
And if you encounter a bad sector or block, your enter backup could be lost.
You can compress file using utilities such as "gzip".
The gzip compression utility is both fast and efficient, which makes it a very popular way to compress files.
The gzip utility takes a file, compresses it, saves the compressed version, and then removes the original file.
If gzip fails to compress the file correctly, it does not remove the original file.
Say you have a tar file, recruitment.tar, that you want to compress.
To compress this file using gzip, you enter the command:
gzip recruitment.tar
Then you can see that the compressed file recruitment.tar.gz is now only 200781 bytes, whereas it was 798720 bytes before being compressed.
The gzipped file is automatically given a .gz extension.
And the uncompressed version of the file is removed by gzip once the compression has been completed.
The gunzip utility allows you to unzip a gzipped file.
Say you want to unzip the file brad.tar.gz.
To do this, you enter:
gunzip brad.tar.gz
[/b]
* may have a few spelling errors. | | Junior Member with 6 posts. | | Join Date: Apr 2003 Location: Nottingham England | | What can I do with a tra.gz file ????? Hello Everyone
This is a thank you note to all the people who took the time to reply to my appeal for help. I am glad to say that your replies have saved me from going bald Hee-Hee.
The explanation from
bassetman was excellent now I know that if I hit any more problems I feel sure that in a flash the Linux community will come to my help
again Thank You all
.................................... Pat .........................
Byeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee | | Moderator - Gone, but never forgotten with 48,307 posts. | | Join Date: Jun 2001 Location: Great White North (WI) Experience: Getting somewhere I hope | | *blush* Thank you!
I try to help wherever I can! | | Distinguished Member with 2,051 posts. | | Join Date: Nov 2002 Location: Alberta, Canada Experience: Windows: Decent. Unix/Linux: Advanced +1 | | I dunno if tar uses/adds it itself, but the extension .gz usuall reffers to Gnu Zip | | Junior Member with 8 posts. | | | | In RH 9.0 (I use gnome), you can double-click tar and tar.gz files in Nautilus to expand them. Also, one can install an RPMs by double-clicking them. If you don't get a second screen, the RPM bombed. Larry |  THIS THREAD HAS EXPIRED.
Are you having the same problem?
We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.
|
Smart Search
| Find your solution! | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | |  WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
| You Are Using: |
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 07:06 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd. | |
|