|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | 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 !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
[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! |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
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 |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
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! |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is there a way to convert a binary file to text file in UNIX? | vee_789 | Shell Programming and Scripting | 7 | 05-22-2011 04:15 AM |
| convert binary file into text file | modcan | Shell Programming and Scripting | 2 | 12-29-2008 09:28 AM |
| Reading a binary file in text or ASCII format | Nagendra | Programming | 3 | 12-03-2008 05:11 PM |
| How to convert binary Unix file to text | user12345 | UNIX for Dummies Questions & Answers | 5 | 11-10-2006 05:53 AM |
| Binary data to text file conversion | auro123 | UNIX for Dummies Questions & Answers | 1 | 12-26-2005 05:48 AM |
|
|