![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
tar.gz
Hi ...
I am using HPUX11.00 can any one please tell me how to make a tar.gz (mean compresed tar file I mean i want to take some directory and create a tar.gz file out of that directories then ftp it to another server and uncompress and restore it their. i want to know the gzip command to do that...which will take all the files with in a directory and make tar.gz Thanks and regards Prafulla |
|
||||
|
Just a hint - you'll need to tar the file before you zip it.
If you want to check that your profile has 'access' to tar and gzip type which tar gzip This will display the PATH that is used for these utilities. If you don't have a PATH displayed for both or either - you need to locate them - which is typically going to be in /usr/bin - although you may need to search for them. You can then add them to your path. Do this by editing the PATH in your .profile (found in your base directory for your user). |
|
||||
|
In order to make a tar.gz file you should do the following. First use the tar command to make the .tar file, to do that either go to the parent directory, of the directory you want to make an archive file, and type <B><I>tar cfpv filename.tar dirname</I></B>. The options are <B>c</B> for creating a new archive, <B>f</B> for using an archive file, <B>p</B> for extracting all protection info and <B>v</B> for verbose. The are numerous others options which you can find from the manual page of tar. That will create the archive file filename.tar which then you have to compress it, to do so type <B><I>gzip fliename.tar</I></B>. That will create the file <I><B>filename.tar.gz</B></I>. Instead of going to the parent directory of the directory you want to make the archive file you can also write the obsolute path.
In order to uncompress and extract the file you type <B><I>tar zxpvf filename.tar</I></B>. Last edited by developer; 01-29-2002 at 09:59 AM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|