Posts

Showing posts with the label CAFEBABE File Types Operating System Curiosity killed the cat

Magic Number and the file system mystery - Who is the original CAFEBABE ?

Image
File Types and Magic Numbers Most operating systems has a way of recognizing file types. An operating system needs to recognize a file type so that it will know what to do with it. Since all files are just bits and bytes in the disk it will need to know how to interpret does bits and bytes in a manner consistent to what type of file it is. One of the most common ways to designate a type to a file is through using file extensions. The part of the file name after the dot (.) . Like .exe, .doc, .java, .jpg An operating system will be able to recognize a file using this extension. This is most commonly used in Windows. In Unix it is a little bit more flexible. Unix defers how an application can recognize files it can act on. One method is using Magic Numbers ( What are magic Numbers ? ). But not all files have magic numbers. Unix also allows file extensions - but this is not enforced or dictated by Unix (not like windows) like .sh .c .gcc .o [1]  So, Now what is CAFEBABE