Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@electrineer well yes but i'm just looking for a quick and dirty way to categorize filenames in a data structure based off mostly likely extension.
unless... do you know of a tool that reads a few bytes in and determines the filetype that runs on Linux ?
I'm pretty sure even the OS will default to a filetype in the explorer display that might be incorrect, usually it will seem to default to whatever an installed application registers the extension as in some cases otherwise saying things like '.pbt file', if there is nothing associated with '.pbt file'.
Or say classical types like .PNT. -
@electrineer See the problem is the list is exhaustive. It contains some really obscure things like Panther JAM project files or Dragon Audio Projects.
I had only ever heard of those tools the last time my dumb ass started working on this same project.
Apparently there is a tool in linux called 'file' that does these things.
Who knew there were so many goddamn duplicate file extensions spanning generations....
There is literally nothing to do but rate likelihood.
Does anyone know of a statistical database that tracks the appearance of certain file types and their frequency based of real analysis of active computer systems ?
Some of these types are pretty vague and fileinfo repeats some things. grr.
Of course, overthinking here, one would have to also look at what kind of files appear in the same directory in certain cases.
rant