On 16/03/13 19:03, highskywhy@yahoo.de wrote:
>
> Sa Mär 16 19:55:28 2013
> Good evening
>
> Question:
> What is bat com exe in Linux?
>
> What is the name of these filetypes in Linux.
> I think sh and bat is the same?
>
>
> Regards
> Sophie
>
>
Hi,
These are just extensions to the filename that in Windows are used to
determine the type of file, under Linux there is no real connection
between what you name a file and what type of file it is, or how you can
use it.
a bat file is a plain text file containing msdos type commands as you
might type into a command shell. In Linux these are called shell scripts
and generaly start with a special line called the hash bang which looks
something like-----
#!/bin/bash
the symbols #! are special and tell the system to use the following
program to run the file '/bin/bash' is one of many programs you can use
and is the program you use as a command shell.
Conventionally people do add 'sh' to these files but anything is fine,
.shell, .bash, .csh, .ksh are also used. You will also see programs for
some languages using this perl, python, ruby and awk
a com is a command file and works in much the same way
An exe is an executable program, under linux any file can be marked as
executable (including shell scripts), every file has a set of
'permissions' attached to it, you can see them by typing ls -al at a
command prompt, one is called the execute permission or 'x'. you can set
it by typing chmod +x filename. this will make any file executable.
when you try to run a program (a file with it's execute permission bit
set) the shell looks at it to deternmine what type of file it is, if it
is text and contains a #! it passes the file to the named program,
otherwise if it is a binary file (a program) it loads and ececutes it.
Trev.
------------------------------------
To unsubscribe from this list, please email LINUX_Newbies-unsubscribe@yahoogroups.com & you will be removed.Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/LINUX_Newbies/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/LINUX_Newbies/join
(Yahoo! ID required)
<*> To change settings via email:
LINUX_Newbies-digest@yahoogroups.com
LINUX_Newbies-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
LINUX_Newbies-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment