how to retain text using pax


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers how to retain text using pax
# 1  
Old 04-06-2004
how to retain text using pax

I have a .tar file consisting of text and binary files. I ftp'd the .tar file using ftp binary.

when I did the pax to unwind the tar file, I noiticed that the text files were encoded in binary.

**How would I retain the text characteristics of the ascii text files, while also keeping the binary characteristics of the binary files?

thanks

mike
# 2  
Old 04-06-2004
i have never used pax so i have to ask, why not just use tar to unpack your tarfile?
# 3  
Old 04-06-2004
good question. Pax was recommended to be used in the design phase. We are in the coding phase now.

Are you saying that there is a switch in 'tar' to untar? what switch would that be?

Last edited by idic5; 04-07-2004 at 11:39 AM..
# 4  
Old 04-06-2004
The x option to tar tells it to "untar".
Code:
tar xvf my_tar_file.tar

.
Check
Code:
man tar

for the many different things you can do with tar.

Peace
ZB
http://www.zazzybob.com
# 5  
Old 04-06-2004
Great point on using tar -x. So I tried this and I still get binary data.

Here is the chain of the txt file....tell me if the BINARY parm of ftp caused any problems.

1) we create a tar file consisting of a txt file and adobe pdf's

2) we ftp this tar file WITH BINARY option up to a server

3) we ftp GET this tar file WITH BINARY down to our site

4) we untar/pax and the txt file is binary; the pdf's are fine

Last edited by idic5; 04-07-2004 at 11:10 AM..
# 6  
Old 04-06-2004
I'm not too sure why this is happening for you.
I regularly upload and download to/from my webserver a mix of plain text, HTML, .class, .tar, .gz, etc.. files, ALL using BINARY mode, and have never had any problems.

It is my understanding that using ASCII mode to transfer plain text just allows a slight performance boon by using a slighly more optimised method for encoding the data transfer. But seeing as you are ftp'ing a TAR file, you must use BINARY anyways.....

Is the file plain text to start with? What tar command are you using to bundle everything up?
# 7  
Old 04-06-2004
I just learned that the tar is being done programmatically in java. I was told there is a java component that will issue the tar.

Very interesting.

My java friend will now do a test to executing the tar from unix proper and not from java.

thanks

m
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help using pax to restore into current directory?

Hello, I have a tape backup (it was made using dd/tar) and I want to use dd/pax to restore tape to disk, in IBM AIX 7.2. I can restore from tape using example below without issues. #/usr/bin/dd bs=128k if=/dev/rmt0 | /usr/bin/pax -r -v /home/c3rb3rus/utils/* USTAR format archive... (6 Replies)
Discussion started by: c3rb3rus
6 Replies

2. HP-UX

Exclude socket files from PAX backup

I am working to move my production backups to PAX and have just about everything working. However, when generating a verbose log there is a high number of 'errors' logged regarding socket files: pax_enh: /var/opt/dce/rpc/local/s-3/135 : Skipped socket file. Is there a way to tell PAX... (10 Replies)
Discussion started by: jduehmig
10 Replies

3. HP-UX

Email notifications of PAX backups

I have just switched my production server from using the br_backup script that uses fbackup to the fs_backup script that uses PAX. Things seem to work fine and test restores are successful, but I'm not getting a daily e-mail with the backup results that I used to get from the br_backup script. ... (2 Replies)
Discussion started by: jduehmig
2 Replies

4. Shell Programming and Scripting

Help with tar/pax

Hi, I have tar ball "data.tar" which consists of many files from different directories. If I untar a file using following command, it will untar file to location /input/data tar -xvf data.tar /input/data/abc.txt I want the file to be untar in current directory and or any other... (3 Replies)
Discussion started by: pinnacle
3 Replies

5. UNIX for Dummies Questions & Answers

Difference between 'pax', 'tar', and cpio

Could any one please help me in understanding the difference between pax,tar and cpio. all of them basically creates archive files. (9 Replies)
Discussion started by: joshi123
9 Replies

6. Shell Programming and Scripting

pax me out

hi I am using this command pax -f /Unix/codes/code.tar -r -s::/Unix/archive: objective is to transfer tar file /Unix/codes/code.tar to /Unix/archive with untarring done . For this reason i am using pax and not tar -xvf as we cant specify untarred destination in that the problem is... (2 Replies)
Discussion started by: ultimatix
2 Replies

7. AIX

Backup with Pax command. How to verify tape?

Dear all experts online, In my environment of AIX 5300-07, I am currently using "pax" command to backup all filesystems that I need to backup and it will take me around 4 hours time with LTO3 tape drive. When I need to verify the tape after backup, I am using "pax" command to list all files in... (2 Replies)
Discussion started by: kwliew999
2 Replies

8. UNIX for Advanced & Expert Users

pax help

we created a TAR file ( souce /opt/oracle/10.2) . If we want to extract it diff directory say (/tmp) . I know we can use pax to do this .but inside TAR we have absolute path ref . if we pax does it replaces absolute path in TAR ? Thanks (1 Reply)
Discussion started by: talashil
1 Replies

9. AIX

PAX error on retrieving from tape

Hi, I am using AIX 5.3.0.0 and Ultrium LTO3 Tape Drive as rmt1. I have backup some of my database file using command "pax" as pax -wvf /dev/rmt1 "./data01/abc.dmp" But when I tried to read the file from tape by issuing the command, pax -vf /dev/rmt1 The error message displayed as pax:... (4 Replies)
Discussion started by: kwliew999
4 Replies

10. UNIX for Dummies Questions & Answers

Solaris and PAX

I am having trouble with the pax command on Saris. I want to sue it to untar a file to a different directory. So if mytar.tar conatins files that were in /u02/mydir/mydir2/mydir3, I want to untar them to /export/home/mydir. An example I have is: pax -r -s... (2 Replies)
Discussion started by: hshapiro
2 Replies
Login or Register to Ask a Question