Re: command for checking executability

2008-11-25 Thread Can-Hua Chen
On Tue, Nov 25, 2008 at 09:21:07AM +0100, Håkon Alstadheim wrote: > 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 f

Re: command for checking executability

2008-11-25 Thread Håkon Alstadheim
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 ve

Re: command for checking executability

2008-11-25 Thread Tzafrir Cohen
On Mon, Nov 24, 2008 at 06:46:51PM -0800, Kelly Clowers wrote: > On Mon, Nov 24, 2008 at 18:03, Can-Hua Chen <[EMAIL PROTECTED]> 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. > > I

Re: command for checking executability

2008-11-25 Thread Can-Hua Chen
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 t

Re: command for checking executability

2008-11-25 Thread Dave Sherohman
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

Re: command for checking executability

2008-11-24 Thread Kelly Clowers
On Mon, Nov 24, 2008 at 18:03, Can-Hua Chen <[EMAIL PROTECTED]> 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. I think you could do this with file or readelf, although I am not sure if thi

command for checking executability

2008-11-24 Thread Can-Hua Chen
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. thanx. Can-Hua Chen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]