Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some files. All of them were created in different operating systems.

Is there any way to identify from which OS each file was generated?

share|improve this question

closed as not a real question by Nifle, BBlake, Indrek, allquixotic, 8088 Sep 19 '12 at 23:02

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Not for all (most) files. – martineau Sep 19 '12 at 16:45
Are these simple text files? – terdon Sep 19 '12 at 16:47
I can generate a Word .doc file on Windows, or Linux (with LibreOffice). It would be impossible in the general sense. I can generate a Windows (line ending) text file on any OS. – Rich Homolka Sep 19 '12 at 16:50
What sort of files are they? Providing more details may result in a better answer. – Karan Sep 19 '12 at 17:03
What's the original problem? Or, why do you need to do this? – Keith Sep 19 '12 at 17:45

In general, no, not really.

In practice, it may be possible, but it depends on the file and the disk. If it is a text-file, you may be able to identify the OS that created it by the line-breaks:

CR+LF = Windows
LF    = Linux
CR    = Mac

Of course these are only the default line breaks used and there are text editors for each OS that can allow you to manually specify what to use.

If it is a binary file, then there will likely be a file-format that governs the format of its contents, so there is no way to know what OS created it.

You may be able to get a clue as to the originating OS from the disk itself. You could examine the type of the partition, but again it is not a guarantee since most modern OSes support most of the common partition types.

You may also be able to glean some information about the origin of the file via its meta-data (if any).

share|improve this answer
CR would be only Mac OS Classic, no? (side note: I've seen LF+CR once in something Novell-related) – grawity Sep 19 '12 at 17:35
Maybe it was Cherry Mac. :-D Yes, probably only System* because OSX is Linux based, so I think it uses LF. The lone CR is still called Mac style though since few (if any) other OSes did it that way. – Synetech Sep 19 '12 at 17:40
*Unix-based (Mach+BSD) – grawity Sep 19 '12 at 17:42

Depending on the file type you may actually end up with a sound heuristic (Synetech pointed out one for text files.) However, if you were hoping for some kind of fingerprint inherent to all files an OS generates, (as with tcp/ip implementations) I don't think anything the like exists so far.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged .