It looks like it's in a binary format and is printing control characters because it isn't a format intended to be viewed/edited. You could try opening it in a hex editor and see if you can make any sense from that.
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
Doing this by hand is challenging but possible.
First you need a hex editor, not a text editor. xxd on linux will get you started but you might want something a little more user friendly.
Then look for a label for a value you know, xxd and other hex editors will show ascii text on the side. Hopefully you'll be able to identify the value (in hex, probably 4 bytes but could be 1, 2, or 8 as well) somewhere before or after the label. You might have to get familiar with endianness, two's compliment, and binary floating point before the numbers make sense.
Once you know how to read a value after a label you'll need to find some label for the information you don't know. If it isn't displayed in the program it might not have a super readable label.
hexdump
comes stock with most distros, no editing features, buthexdump -C filename
will at least let you see what’s in the file- from control characters and control codes, it looks like everything is separated by a set of three
NUL
characters (\00
in first screenshot or^@
in the nano screenshot)- EDIT: so the field names are three
NUL
characters, text for the name, andSOH
(^A
) terminating the field name – then a padded line for the field values (values are probably meant to be fixed length)
- EDIT: so the field names are three
- if you don’t find anything more convenient, as a last resort, you can turn to
perl
andsed
, they were originally designed for situations like this, trying to get meaningful data out of disparate file formats
Maybe strings
can get some usefull output too?
Use a hex editor to read binary files. I recommend ImHex https://imhex.werwolv.net/ because it includes all sorts of advanced analysis stuff.
Can you provide the file on GitHub or something?