Register a domain and help support LQ
Go Back > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Fedora This forum is for the discussion of the Fedora Project.


  Search this Thread
Old 03-18-2007, 05:00 AM   #1
Registered: Mar 2007
Posts: 36

Rep: Reputation: 15
how file browser detects file type without .3 sufix?


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!
Old 03-18-2007, 09:58 PM   #2
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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.
Old 03-18-2007, 10:20 PM   #3
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 13,485

Rep: Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347
Enter this at a terminal "man magic"


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
howto convert .flw (koffice/kivio file) into windows readable type of file? rahmmandel Linux - Desktop 7 01-30-2007 04:12 PM
Changing file-type of a text file olspookishmagus Linux - General 3 05-03-2006 01:00 AM
How to get the file type without using "file" command. kumarraja Programming 2 03-03-2006 06:41 AM
Getting the type of the file rajesh_b Programming 4 09-26-2004 02:04 PM
open file, file of type selections rkfb Linux - Newbie 2 11-19-2003 05:32 AM

All times are GMT -5. The time now is 05:44 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration