Examine the command and output shown:
bash-4.1# 1s
1s: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file
or directory
No files have been deleted from your system and you want to determine the cause of the error.
Which two commands or utilities can help the root user diagnose this problem?
A.
ldd
B.
dmesg
C.
grep libselinux.so.1 /var/log/dmesg
D.
strace
E.
grep libselinux.so.1 /var/log/message
Explanation:
To diagnose the problem, use the following commands:
ldd /usr/bin/ls
and
ldd /cat
strace -o /tmp/ls.strace -f su – root -c ls
Reference: http://www.experts-exchange.com/OS/Unix/Q_25150132.html
Answer : A and D
Reason:
strace is used to trace the execution of an executable.
Linux’s ldd command reports the names of the libs required by an application plus the path to each lib. If ldd lists a lib but does not report a path for that lib then that lib is missing and needs to be installed. Ldd is run from the command line in a terminal.
Not B and C, /var/log/dmesg – Contains kernel ring buffer information. When the system boots up, it prints number of messages on the screen that displays information about the hardware devices that the kernel detects during boot process.
/var/log/messages instead aims at storing valuable, non-debug and non-critical messages. This log should be considered the “general system activity” log.