Selecting an application
Yennie at aol.com
Yennie at aol.com
Wed May 7 12:02:01 EDT 2003
All these things considered, the only _true_ sign of an executable is the
executable flag on the file. The rest of the suggestions may help, but I
don't believe they will ever be 100% reliable. UNIX simply doesn't have a
distinction between executable and application. When it really comes down to
it, I can create any file with any name and any extension, type in "chmod +x
myFileName", and it will look just as executable as any other file can.
Unless you can find an effective way to look inside the contents of the
files, nothing from the file's name or permissions will be a guarentee that
it's the equivalent of an application.
Everything else would really be a hack to get "application-style" executables
to list.
Perhaps I'm missing something, but I think the reason this one can't get
ironed out without some kinks is simply that UNIX doesn't have the same idea
of apps as the more "user-friendly" OSes.
I'd still say check the executable permission for sure, and then maybe
consider peeking at the first line of the file to filter out scripts. It
still won't be perfect, but at least you'll get a superset of what you are
looking for.
HTH
------------------------------
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
www.QLDLearning.com
PH: (904)-997-0212
EMAIL: Yennie at aol.com
-------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.runrev.com/pipermail/metacard/attachments/20030507/25678152/attachment.htm
More information about the metacard
mailing list