Getting Info About a File In GNU/Linux

You can learn arch, dynamic/static status, stripped/non-stripped status, interpreter library name of the application with below command:

file sample_application

Result: sample_application: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/l, for GNU/Linux 2.6.32, BuildID[sha1]=e587ed9e159104d852fe8c6214cf21bafee16bcc, not stripped

Interpreter /lib64/l is both application and library.

If the application is not stripped, you can see codes with gdb clearly. You can use the below commands.

gdb sample_application

#gdb list

… code …

You can learn libraries used by sample_application with below command:

objdump -p sample_application | grep NEEDED

Result:

NEEDED libselinux.so.1

NEEDED libc.so.6

Also, we can see shared libs with the “ldd” command:

ldd sample_application

Result:

linux-vdso.so.1 => (0x00007ffe8032a000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fa96c464000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa96c09a000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fa96be2a000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa96bc26000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa96c686000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa96ba09000)

You can see shared libraries used by the sample_application, all libraries have a path except linux-vdso.so.1 library. Vdso means virtual dynamic shared object. The virtual object is used to accelerate certain system calls between kernel space and user space.

The ext3 is a log-based file system. While Linux core is compiling, if you select data=write back then you ensured performance or you select data=ordered, you ensured data integrity. data=ordered selection is recommended.

File systems –>

<*> Ext3 journalling file system support

[*] Default to ’data=ordered’ in ext3

tmpfs is a virtual file system. You can use it as follows:

$ mkdir /mnt/disk4
$ mount -t tmpfs tmpfs /mnt/disk4

Linux core support can be given as follows.

File systems –>
Pseudo filesystems –>
[*] Virtual memory file system support (former shm fs)