I have a question for you all. I am working at a company and we are trying to recover .dat files which were created on an older linux box and we have a folder of .dat files that are unreadable. When you try to open them in a text editor you get jibberish all shapes and sizes and when you try to open the files in a file viewer it shows them as a hexadecimal/binary file. These .dat files ultimately have or should have readable data in them stating what we need. If anyone has some solutions or would like to know further details I really would appreciate it. I also checked the permissions on the files and the user it belongs to on the unix box and we were unable to open them on the unix box or on the windows box.
Comsidering the extention of the file (.dat) I doubt they are plain text files. Allthough any extention can be given to a file in Unix, it is not common to use it for plain text files.
The following command could provide you some info about that kind of files they are:
file <filename>
or just
file *
So "file" is a command here and not a reference to a file, <filename> is one of those .dat files.
To see if there is any ascii content at all in those files you can use the command:
strings <filename>
How were these files created? By some kind of application? If so, which application?
nah that doesnt make sense........I guess what im trying to say is do you know a way to read these dat files so we can understand what they mean besides hex or binary because they were made in fortran and they have important info on them that my company needs and we have tried alot and before we recreate lets says 500 dat files we want to try to get them readable.
sb008 is telling you to run the file command to see if it can identify what the actual file type is, without knowing how the files were written how can you expect someone to be able to tell you how to read them?
they are .dat files but they were created from a .hea file. I know what type of files they are I was just wondering on how I can make them readable. These .dat files are created from insurance testing from my company which is FM Global. So we need the data for the previous years. sb008 didnt mean to throw you for a loop or insult you I just didnt think that would be the best thing to do but I know limited things when it comes to unix.
I dont know what running the file command means also so if you could explain to me on how to do it I will be glad to find out what you are referring too.
if the files are still on unix/linux open a ssh or telnet session to that machine, (or go directly to keyboard and monitor if you have access), get a command line prompt, switch to the directory your files are in and type "file yourfile.dat"
yourfile.dat stands for the name of your .dat file
if the files are on windows, copy them to linux and run the command
Ahh ok. Well heres the thing I dont know if this will help my boss knows what type of files these are, and these files are made from a bin and hea file after a fire test is ran because where I work we run fire tests because FM Global is an insurance company. So we have two folders that have working .dat files but the files in this rawdata folder are unreadable . So I wonder if its possible to open them with some sort of file viewer in which i tried many. We can recreate these dat files but there are about 500 and that is alot of time money and effort. Appreciate the feedback. Thanks
readability, as your mentioned in you first post does not automatically mean readable for you in a text editor
you can't provide us with any necessary information, even when someone tells you the next steps, you are not able/don't want to do it, so tell me: what kind of answer do you expect?
something like: get the program "datfilereader" on download.com, open it and be happy?
they could be compressed, really a binary file, or anything else
Funksen, I would do this at my work so yes I am able to do this and was just looking for some help. I will go on with this and most likely recreate all the .dat files because they made be corrupt not 100% sure.
I just got on the unix box and ran the file command and I have came to this conclusion. I ran the file command for a dat file that is readable and has text and I ran the file command for the .dat files I could not read. The .dat file in the folder that I could read said ascii text, and the .dat file in the folder that I cannot read is a awk program file. I guess my next question would be is, is there a way to convert these .dat files I cant read to ascii from awk or what would be the next step to take.