[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: command for checking executability



On Tue, Nov 25, 2008 at 01:27:16AM -0600, Dave Sherohman wrote:
> On Tue, Nov 25, 2008 at 10:03:08AM +0800, Can-Hua Chen wrote:
> > hi, I am writing a bash script, and need a way (preferably a 
> > shell command) to check whether a binary file can run on
> > the platform before hand.
> 
> -x will tell you whether you have execute permissions for the file (or
> directory), if that's what you're looking for.  If you mean that you
> want to check CPU architecture, binary compatibility, etc., your best
> bet would probably be to somehow parse the output of the 'file' command.

I do mean binary platform-compatibility and compatibility of 
linked library


Reply to: