[AIX] Binary file warning for text file.


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers [AIX] Binary file warning for text file.
# 1  
Old 10-12-2012
[AIX] Binary file warning for text file.

Hello guys,

We had to move from a DC to another, and we are now facing an "issue" with some text files.

Looks like that some of our log files are set as binary:

file TuxConnectorURA.20121012
TuxConnectorURA.20121012: data or International Language text


less TuxConnectorURA.20121012
"TuxConnectorURA.20121012" may be a binary file. See it anyway?

but I can see it normally after pressing "y"


My question is... is there a way to correct it? Will it causing any impact? (I'm afraid that non-log files are with such problem).


Thanks a lot!
# 2  
Old 10-12-2012
Unix file recognition is steered by a file called "/etc/magic". It contains rules for what has to be in a file to make it a file of type x. It works like "if a file has an 'x' as the 12th byte and a 'y' as one of the first 3 bytes than it is ...". As this is ultimately best-guess its outcome can be wrong sometimes. This may be the case with your file for reasons unknown.

Issue "file /path/to/your/logfile" to find out which type the system thinks it is (the "file" utility bases its outcome on the same mechanism). You can even correct the type database in "/etc/magic" by putting in new entries - see "man /etc/magic" for details how to do so.

It is also possible that your file contains some unprintable characters "less" filters out, which make "file" think it is binary. In this case you probably should correct your logging mechanism because writing hex characters in a log file is wrong.

I hope this helps.

bakunin
# 3  
Old 11-06-2012
Sorry for the long delay to respond.

Looks like after the logs rotated, they went back to normal. It's happening only after the server boot, but get to work properly after it rotates.

Thanks!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Text File with Binary Values processing

Hello all, I have a txt file containing millions of lines. Below is the example: {tx:be} head -50 file.txt Instr1: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Instr1:... (6 Replies)
Discussion started by: Zam_1234
6 Replies

2. UNIX for Beginners Questions & Answers

Convert Excel File (xls) to tab delimited text file on AIX

Hi i have a problem in my job i try to convert an excel file (xls extention) to text file (tab delimited), but no result with this comand cat xxx.xls > xxx.txt Do you have eny idea? PS: sorry for my english Thanks!! (4 Replies)
Discussion started by: frisso
4 Replies

3. UNIX for Dummies Questions & Answers

Converting binary file to text file

Hi, Im wondering how I can convert a binary file to a text file? I have ran the following command to output which type of binary file coding it is od -t x1 -c eHat.data0 | head -20 and that gives me the following output; 0000000 5c 00 00 00 cd 06 f2 41 00 00 00 c6 00 00 00 c6 \ \0 \0 \0... (3 Replies)
Discussion started by: dp0b
3 Replies

4. Shell Programming and Scripting

Convert binary file to csv and then back to the binary format

Hello *nix specialists, Im working for a non profit organisation in Germany to transport DSL over WLAN to people in areas without no DSL. We are using Linksys WRT 54 router with DD-WRT firmware There are at the moment over 180 router running but we have to change some settings next time. So my... (7 Replies)
Discussion started by: digidax
7 Replies

5. AIX

how to create a variable block binary file on AIX

:confused: Hi there I have a requirement to create a variable block binary file on AIX. Once the file has been feed with info , the file needs to be ftp to MVS. The problem experienced; when transferring the file to MVS. MVS does not pick up the carriage return line feed, which OA OD ... (0 Replies)
Discussion started by: Luke21
0 Replies

6. Shell Programming and Scripting

Create multiple text file from a single text file on AIX

Hi I need to create multiple text files from onc text file on AIX. The data of text files is as below: ********************************************** ********************************************** DBVERIFY: Release 10.2.0.4.0 - Production on Tue Nov 10 13:45:42 2009 Copyright (c) 1982,... (11 Replies)
Discussion started by: lodhi1978
11 Replies

7. Shell Programming and Scripting

convert binary file into text file

im looking for anothr way to convert binary file into text file im using old solaris version (exatcly like xxd -r) thanks (2 Replies)
Discussion started by: modcan
2 Replies

8. Programming

Reading a binary file in text or ASCII format

Hi All, Please suggest me how to read a binary file in text or ASCII format. thanks Nagendra (3 Replies)
Discussion started by: Nagendra
3 Replies

9. UNIX for Dummies Questions & Answers

How to convert binary Unix file to text

Hi all, I have a print control file (dflt) for Oracle which is in binary. As I am going to develope an application in Window environment, I would like to reference the dflt file. But it is in binary format and I cannot access it. Anyone can suggest me how to convert the file into text or... (5 Replies)
Discussion started by: user12345
5 Replies

10. UNIX for Dummies Questions & Answers

Binary data to text file conversion

Dear Sir; i want to know how the binary data convert to text file or readablw format (ASCII).If possible pl. help me for the software and where it is available for download. i.e. (1 Reply)
Discussion started by: auro123
1 Replies
Login or Register to Ask a Question