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

Thread Tools Search this Thread Display Modes
Old Unix and Linux 02-08-2016
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.

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 01:38 PM..
Sponsored Links
Old Unix and Linux 02-08-2016
gull04 gull04 is offline Forum Advisor  
Registered User
Join Date: Dec 2004
Last Activity: 22 September 2017, 6:53 AM EDT
Location: Isle-of-Skye
Posts: 714
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.


Sponsored Links
Old Unix and Linux 02-08-2016
wisecracker's Unix or Linux Image
wisecracker wisecracker is offline
Registered User
Join Date: Jan 2013
Last Activity: 12 September 2017, 4:42 AM EDT
Location: Loughborough
Posts: 1,221
Thanks: 366
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...

Old Unix and Linux 04-27-2016
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.


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
Old Unix and Linux 04-27-2016
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
Join Date: Aug 2005
Last Activity: 22 September 2017, 5:42 PM EDT
Location: Saskatchewan
Posts: 22,417
Thanks: 1,126
Thanked 4,235 Times in 3,915 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

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 04:53 PM
FASTEN count line of dat file and compare with the CTRL file ckwan Shell Programming and Scripting 3 11-26-2013 01:32 PM
How to decode nfs file handle in HP-UX? vipinable UNIX for Advanced & Expert Users 1 04-26-2011 07:56 AM
Performance issue in UNIX while generating .dat file from large text file KRAMA Shell Programming and Scripting 19 05-20-2009 10:55 AM
DECODE file field is required in Bash hanu_oracle Shell Programming and Scripting 1 02-24-2009 03:30 AM

All times are GMT -4. The time now is 08:22 PM.