LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-03-2007, 02:55 AM   #1
RGummi
Member
 
Registered: Nov 2005
Posts: 90

Rep: Reputation: 15
detecting if a program is a 64 or 32 bit application


Hello,

is there a commadline tool which can detect if a program is 64 bit or 32 bit? Ok I can use ldd to see which libraries are needed but I want it more direct.

Thanks
 
Old 10-03-2007, 03:17 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
How about 'file'?
Quote:
$ file /bin/bash
/bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped
I haven't got a 64-bit machine to give a corresponding output from it, but try out
 
Old 10-03-2007, 05:01 AM   #3
RGummi
Member
 
Registered: Nov 2005
Posts: 90

Original Poster
Rep: Reputation: 15
Hello,

yes it is the 'file' command!

I have also found it.
It says ELF 32-bit or ELF 64-bit

Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Assembling a 32 bit sample program in a 64 bit world debiant Programming 0 10-14-2006 02:52 PM
32 Bit Application Support on a 64Bit OS/Hardware i2tall2c Red Hat 0 04-18-2006 02:32 PM
Porting 32 bit application kars_jk Programming 1 01-24-2006 11:39 PM
any test application to help detecting intrusions on a host? nedianz Linux - Security 4 07-16-2005 11:08 AM
need an idea on detecting USB pen present in user program captainstorm Programming 4 11-26-2003 07:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration