Need Simple Way To Determine If File Is Executable
Sebastian 'lunar' Wiesner
basti.wiesner at gmx.net
Wed Dec 20 06:44:45 EST 2006
Fredrik Lundh <fredrik at pythonware.com> schrieb
> Sebastian 'lunar' Wiesner wrote:
>
>> No, they aren't! Try this:
>
> you're confusing the shell's "is this file executable" check with the
> loader's "can I execute this file" check:
>
> $ export PATH=.:$PATH
> $ dd if=/dev/zero of=ls count=1
> 1+0 records in
> 1+0 records out
> $ ls -l ls
> -rw-rw-r-- 1 slab slab 512 Dec 20 03:33 ls
> $ chmod a+x ls
> $ ls
> -bash: ./ls: cannot execute binary file
???
Am I blind or is there really no difference between you shell example an
mine?
As far as I can see, you are doing exactly the same thing as I did...
So what are trying to proof?
Sebastian
--
Freedom is always the freedom of dissenters.
(Rosa Luxemburg)
More information about the Python-list
mailing list