Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Steps to untar file in aix 5.2

Status
Not open for further replies.

zircon06

Technical User
Jan 8, 2007
81
I have a file upgrade.tar. Any one tell me step to untar this file after ftp to aix box.

Thanks in advance
 
copy the file to a directory of your choice and type:

tar -xf upgrade.tar

If you want to see the files as they are extracted from the tar file, type this:

tar -xvf upgrade.tar



Add a little color to your PUTTY terminal: faq52-6627
 
Careful if the tar file was created with absolute pathnames as there is a chance of overwriting any other valid file(s) you may have. You can check without untarring anything using tar -tvf upgrade.tar.

I want to be good, is that not enough?
 
Ken is more correct.

Before doing untar, see the contents of the file by "tar -tvf" and then you can extract by "tar -xvf" option.

You can also selcetively restore a file from that tar file.

Like, tar -xvf upgrade.tar <file_name>

The desired file will be restored.

Regards,
Sam
 
Thanks all for the input but it is adding ^M into files when doing ftp files into aix box from windows. Anyone idea to fix this bug
 
^M???? I'm not sure of that but are u sure that the file doesn't have spaces? Is the file in a binary format? if so type "bin" before ftping the file!

Could you show us an example of this ^M that you have so i can understand what exactly you are talking about?

Regards,
Khalid
 
I don't think AIX includes dos2unix (which would do the job), but this should do the job of stripping out the ^M:

sed 's/^M//g' file > newfile
mv newfile file

I want to be good, is that not enough?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top