Unix/Linux Go Back    


Windows & DOS: Issues & Discussions All Windows and DOS questions should go here as well. Discuss UNIX to Windows (Desktop or Server) here!

Decode windows .dat file

Windows & DOS: Issues & Discussions


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 02-08-2016   -   Original Discussion by Alf Stockton
Alf Stockton Alf Stockton is offline
Registered User
 
Join Date: Feb 2016
Last Activity: 8 February 2016, 6:58 AM EST
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Decode windows .dat file

I have received a file from a Windows server that in Linux hexedit shows the following first few characters.

Code:
AA 18 3C 2B  60 56 03 00  00 01 01 00

The Windows program may have received this via RS232.
I need to "understand" this on a Linux machine.
Please suggest where I may start decoding this?

Last edited by jim mcnamara; 02-08-2016 at 02:38 PM..
Sponsored Links
    #2  
Old Unix and Linux 02-08-2016   -   Original Discussion by Alf Stockton
gull04 gull04 is offline Forum Advisor  
Registered User
 
Join Date: Dec 2004
Last Activity: 16 November 2017, 4:51 AM EST
Location: Isle-of-Skye
Posts: 716
Thanks: 18
Thanked 127 Times in 113 Posts
Hi Alf,

You're going to have to give us a bit more to work with I think.

You say that you have received a file from a Windows machine a ".dat" file, you also say the Windows machine may have received the file by RS232.

You don't say what the source of the file is;
  • Was it generated by an application? If so what was it?
  • What have you done in respect of "decoding" the file?
  • What do you need to understand on a Linux machine?

There are many ways of looking at this problem, as to decoding the file - there are lots of tools available if you want to just have a look at the file. Fewer if you want to manipulate the contents of the file, you'll have to give a bit more information.

Regards

Gull04
Sponsored Links
    #3  
Old Unix and Linux 02-08-2016   -   Original Discussion by Alf Stockton
wisecracker's Unix or Linux Image
wisecracker wisecracker is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 13 November 2017, 2:52 PM EST
Location: Loughborough
Posts: 1,224
Thanks: 367
Thanked 323 Times in 253 Posts
I agree with gull04...

A .dat extension is meaningless unless you know what app created it, and even then one might not be able to decode it easily because the file is _binary_...

The fact that it was sent from a Windows server is immaterial it is the app that created it that is important...

So please give us more HEX hexdump to look at AND also use code tags as per forum rules...

TIA.
    #4  
Old Unix and Linux 04-27-2016   -   Original Discussion by Alf Stockton
Projecteer Projecteer is offline
Registered User
 
Join Date: Apr 2016
Last Activity: 28 April 2016, 3:06 PM EDT
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
A .dat is quite a commonly used extension to mean "data", it can be generated by many programs and although I've seen many .dat file headers, I've never seen that header at the start.

it doesn't have an ascii fourcc at the start, so that gives me no clues. I would guess its just data from the start as the values as longs or shorts are very high, unless there are about 43k records or size? i'm just guessing now.

Code:
ª.<+`V

Can you provide the data originator application name?

Is it possible it could be compressed, and headers are omitted (ie a gz stream)
Sponsored Links
    #5  
Old Unix and Linux 04-27-2016   -   Original Discussion by Alf Stockton
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 17 November 2017, 9:25 PM EST
Location: Saskatchewan
Posts: 22,512
Thanks: 1,151
Thanked 4,273 Times in 3,946 Posts
Try the file utility if you have it. file filename.dat It may tell you if it recognizes the kind of file.

In all likelihood you will have to ask whoever built this arrangement, what it is.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Execution of loop :Splitting a single file into multiple .dat file SwagatikaP1 Shell Programming and Scripting 4 08-04-2014 05:53 PM
FASTEN count line of dat file and compare with the CTRL file ckwan Shell Programming and Scripting 3 11-26-2013 02:32 PM
How to decode nfs file handle in HP-UX? vipinable UNIX for Advanced & Expert Users 1 04-26-2011 08:56 AM
Performance issue in UNIX while generating .dat file from large text file KRAMA Shell Programming and Scripting 19 05-20-2009 11:55 AM
DECODE file field is required in Bash hanu_oracle Shell Programming and Scripting 1 02-24-2009 04:30 AM



All times are GMT -4. The time now is 09:01 PM.