File Extension Change Doesn't Help in Linux

Linda

New Member
Messages
7
I changed one of my pictures of an official document to a text file extension and put it in a folder of similar text file extensions.
When I opened the folder in a linux operating system, I saw the image thumbnail (of the file with a text file extension) in the linux explorer.
Apparently, I need to find another method of hiding official documents.
(Yes, I have a simple file encrypting tool that can do that.)
I wonder how it works in mac?
 

My Computer

System One

  • OS
    Windows 8.1 Pro
    Computer type
    Laptop
While Linux recognizes file extensions to associate programs with files, it relies more on the magic number system. It's a number placed directly in the file (generally the first few bytes) which is then compared to a database.
More info : file(1): determine file type - Linux man page

For file managers, the association is based on Mime type which is based on file extension and magic number.

Classic Mac OS used 4-characters type and creator code embedded in the file, not file extension to determine a file format. Not certain about Mac OS X, but I assume it's the same as Linux.
 

My Computer

System One

  • OS
    Windows 8.1 (x64)
    Computer type
    PC/Desktop
Back
Top