[TriLUG] Scanning for executables
Brian McCullough
bdmc at bdmcc-us.com
Tue Jan 3 14:05:07 EST 2006
On Tue, Jan 03, 2006 at 02:00:28PM -0500, James Tuttle wrote:
> I'm scripting a process to look through random GIS data and search for,
> among other things, files that are executable so that they can be
> removed. I first thought of searching for specific extensions, but
> extensions aren't a reliable indication of file type. Permissions won't
> work either, of course. If anyone has any suggestions to offer, I'd be
> grateful. I'm writing in Python in Linux, but the data will be moved to
> Solaris and Windows environments.
First thought -- are you looking for "anything" that might be
executable, or just binaries suitable for that particular platform?
In any case, I would look at the "file" utility and its magic numbers
"database."
> Thanks,
> Jim
Have Fun!
Brian
More information about the TriLUG
mailing list