LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-17-2006, 07:23 PM   #1
zaid
LQ Newbie
 
Registered: Jan 2006
Posts: 5

Rep: Reputation: 0
file extensions??


hello!
what the replacement of windows file extensions in linux
how could someone recognize whta type pf file this is and run it using the suitable application?

thanks
 
Old 01-17-2006, 07:30 PM   #2
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
Some linux files do have extensions - such as .odt for Open Document, .html for HTML, just like in windows.

Executable files dont need extensions, they are made executable by setting the execute permission - see man chmod.

See the manual page for the "file" command. file will tell you what type of file it is.

But really, I don't know what you are asking. Can you post more details?

--Ian
 
Old 01-17-2006, 07:32 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
File type extensions are the same across platforms---ie pdf is pdf, jpg is jpg etc.

You will of course find some extensions that are only used on one platform or the other.

There are typically configuration setting that tell the system what default app to use with a given extension. This will depend on the system you are using.
 
Old 01-17-2006, 07:48 PM   #4
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
IBall is correct, for the most part files are determined by their magic number (which is the pattern at the start of a file) and not by extension. "man file" does a good job of explaining this.

There are applications which are aware of extensions and use them for easily location files which belong to them.
 
Old 01-17-2006, 10:28 PM   #5
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
actually, extension matter in the GUI land. The popular DE's (and all file managers iv every tried, besides worker) dont use magic numbers to determine file type (which is really sad), this makes extensions needed for users documents. On the lower levels of the system (traditional UNIX), file type is meaningless, as the user is the one who opens the file in whatever program they want.

the command "file" can be used to see what type of file something is, but it wont match files to programs or extentions.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux File Extensions kompact Linux - Newbie 3 04-18-2005 09:15 AM
Need help with File Extensions Linux nooB 454 Linux - Newbie 3 04-10-2005 05:41 PM
File Extensions!!! rejeK Linux - Software 5 12-20-2004 07:30 PM
File Extensions RpgActioN Slackware 1 09-22-2004 10:20 PM
GIMP file extensions Crashed_Again Linux - General 4 02-01-2003 04:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:38 PM.

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
Open Source Consulting | Domain Registration