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

Re: command for checking executability



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.

In addition to the permissions and the format, you also need to make sure that any needed dynamic libraries are present in a version compatible with the binary. The command "ldd /some/executable" will tell you what it finds, and what it does not find. A few programmes will load "plugins" in an even more dynamic manner. How to make sure those exist will depend on the app and architecture.


Reply to: