LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   how file browser detects file type without .3 sufix? (https://www.linuxquestions.org/questions/fedora-35/how-file-browser-detects-file-type-without-3-sufix-538459/)

Leon_Amirreza 03-18-2007 05:00 AM

how file browser detects file type without .3 sufix?
 
Hi,

I am windows user want to change my Favorite OS from windows to LINUX.

in Windows, when you browse to a folder it show its icon and type. it detects the file type from its name (same as linux file browser "Nautilus").

suppose the file name be "fn.ext1.ext2", explorer considers the "ext2" to be the type name of the file then searches the registry and finds its suitable Icon. if "ext2" does not exists in the registry then it shows a default icon to inform the user that the file type can not be detected by explorer.


my Question is:
how can nautilus detect the file types in linux correctly despite the fact the some files does not a extension in linux (for example executable files that do not have .exe extension)? what is the standard procedure or convention to detect the file type?

or even i have heard that part of the filename that comes after the last dot may not necessarily be the file type!

MS3FGX 03-18-2007 09:58 PM

Linux determines if a file is executable by the executable bit being set on that file (I.E. chmod +x ./filename), not through the use of extensions like in Windows.

syg00 03-18-2007 10:20 PM

Enter this at a terminal "man magic"


All times are GMT -5. The time now is 09:32 AM.