Thursday, March 25, 2010

Finding information about a program or application

Using Command Line find
To find general information about a program or application, you can use file. For example, if you use
file /usr/bin/mplayer

You will get
/usr/bin/mplayer: ELF 32-bit LSB executable, 
Intel 80386, version 1 (SYSV), 
dynamically linked (uses shared libs), 
for GNU/Linux 2.6.18, stripped
This information tells us on the platform, whether dyanmics are used and for which kernel


Use the Command ldd
If you wish to retrieve all the dynamic linked libraries associated with the program vim, you can type
ldd /usr/bin/vim

You will get the libraries that vim requires
linux-gate.so.1 => (0x006cf000)
libselinux.so.1 => /lib/libselinux.so.1 (0x00a61000)
libncurses.so.5 => /lib/libncurses.so.5 (0x06fdb000)
libacl.so.1 => /lib/libacl.so.1 (0x06a09000)
libgpm.so.2 => /usr/lib/libgpm.so.2 (0x00df8000)
libperl.so => /usr/lib/perl5/5.10.0/i386-linux-thread-multi/CORE/libperl
..........
..........

No comments: