LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-18-2004, 11:42 AM   #1
BC1
LQ Newbie
 
Registered: Dec 2004
Posts: 4

Rep: Reputation: 0
Extension files


Hello Every one .

Comand in linux such as , mv, ls , .. etc .
Have them extension ? like bin , xml , so on .

thanks in advance .
 
Old 12-18-2004, 12:37 PM   #2
Cerulean
LQ Newbie
 
Registered: Dec 2004
Distribution: SuSE 9.1
Posts: 28

Rep: Reputation: 15
No.
 
Old 12-18-2004, 12:47 PM   #3
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Some shell scripts may have a '.sh' extension, though, and there's nothing *preventing* them from having extensions. But *nix identifies an executable by its permissions (having the executable bit set) rather than by name.
 
Old 12-18-2004, 04:37 PM   #4
BC1
LQ Newbie
 
Registered: Dec 2004
Posts: 4

Original Poster
Rep: Reputation: 0
could you give more information about that .

thanks .
 
Old 12-18-2004, 05:01 PM   #5
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
I thought I was giving more information on that (than Cerulean's admirably concise answer).

Seriously, I'm not sure what you mean. Some systems, like DOS's command.com, just look for a .bat, .com, or .exe file and run it no matter what it is. Type up a perfectly valid batch file and call it valid.foo and it won't run. Type up gibberish and call it an .exe and it'll try to run it.

With *nix, every file has a set of permissions - user, group, world, with each set getting read, write, execute permissions. (It's more complicated than that, but that's the core of it.) If you do a 'chmod 700' (or 'chmod u+x' or however it's done symbolically) it has the same effect to your shell as calling something 'bat' does to command.com.

Code:
~
1001>> echo echo hi > scriptwith.extension

~
1002>> scriptwith.extension 
bash: ./scriptwith.extension: Permission denied

~
1003>> chmod 700 scriptwith.extension 

~
1004>> scriptwith.extension
hi
1002's saying 'you don't have permission to execute this file' or, maybe more accurately in this case, 'this file doesn't have permission to be executed'.

Not sure what else to say.
 
Old 12-20-2004, 03:41 AM   #6
BC1
LQ Newbie
 
Registered: Dec 2004
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks a lot
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
remove all files with same extension? scratchnz Linux - General 1 11-04-2005 03:40 AM
files with extension rar ankscorek Linux - Software 5 07-25-2005 09:41 PM
What to do about these files with .new extension? Slovak Slackware 1 11-23-2004 04:50 PM
How program to read files with extension .dat y .cfg files COMTRADE in fedora 1? ivonne Linux - Software 0 11-22-2004 11:42 AM
changing extension of multiple files shaggystyle Linux - General 5 01-29-2004 12:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:25 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