Operating System - HP-UX
1834804 Members
2420 Online
110070 Solutions
New Discussion

Re: binary is 32-bit or 64-bit ?

 
Amit Kureel
Advisor

binary is 32-bit or 64-bit ?

Does anybody know of the unix command to determine whether a binary is 32-bit or 64-bit ?

Thanks

Amit
2 REPLIES 2
Steve Steel
Honored Contributor

Re: binary is 32-bit or 64-bit ?

Hi



file

example

file /stand/vmunix

64-bit :

/stand/vmunix: ELF-64 executable object file - PA-RISC 2.0 (LP64)

32-bit:

/stand/vmunix: PA-RISC1.1 executable -not stripped

Steve Steel

If you want truly to understand something, try to change it. (Kurt Lewin)
John Palmer
Honored Contributor

Re: binary is 32-bit or 64-bit ?

'file ' returns ELF-64 executable object file for a 64 bit binary, something like PA-RISC2.0 shared executable for 32bit.

Regards,
John