Re: what's the meaning of plain text file's executable attribute
- From: Grant Edwards <grante@xxxxxxxx>
- Date: Tue, 28 Feb 2006 19:26:24 -0000
On 2006-02-28, DaVinci <apple.davinci@xxxxxxxxx> wrote:
Q1:
a plain text file name aa.txt
/home/apple/study/note $ ls -l aa.txt
-rwxrwxrwx 1 apple apple 42 Feb 28 20:02 aa.txt
My question is what's the meaningof a plain 's executable attribute
,it is "x" bit.
It means it's executable.
as I know,a plain text file can't be executed.
You know wrong. A plain text file can be executed. If it
doesn't recognize it as a "native" executable format (ELF,
COFF) the kernel will treat it as a "script". If the file
doesn't specifity an interpreter via a "#!<path" line at the
top of the file, it will be be run by a default shell.
only the executable file ,such as /usr/bin/xpdf should have
the attribute of 'x'. so there is no meaning for the plain
text file to have the 'x' attribute,is it right?
No.
Q2:
what's the difference between interrupt and trap.
what I know is that interrupt include software interrupt and hardware
interrupt.
handware interrupt : I/O ,NMI...
software interrupt : divisor is zero...
divisor is zero is a trap.
but,what's more about the difference?
Generally, interrupts are caused by HW events asynchronous to
the program. Traps are generated by the program (either
intentionally or due to an illegal operation).
--
Grant Edwards grante Yow! Let me do my TRIBUTE
at to FISHNET STOCKINGS...
visi.com
.
- References:
- Prev by Date: Re: Graphics card as a co-processor?
- Next by Date: Re: Good C++ development environment (read: debugger) for LINUX
- Previous by thread: Re: what's the meaning of plain text file's executable attribute
- Next by thread: Re: Good C++ development environment (read: debugger) for LINUX
- Index(es):
Relevant Pages
|