LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices



Reply
 
Search this Thread
Old 03-18-2007, 06:00 AM   #1
Leon_Amirreza
Member
 
Registered: Mar 2007
Posts: 36

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

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
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, 11:20 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,491

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


Reply


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 05:12 PM
Changing file-type of a text file olspookishmagus Linux - General 3 05-03-2006 02:00 AM
How to get the file type without using "file" command. kumarraja Programming 2 03-03-2006 07:41 AM
Getting the type of the file rajesh_b Programming 4 09-26-2004 03:04 PM
open file, file of type selections rkfb Linux - Newbie 2 11-19-2003 06:32 AM


All times are GMT -5. The time now is 07:24 AM.

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