Linux - Study Mode

[#741] One of the entry of /etc/passwd file is shown below: user1:x:1111:2222:Example:/home/user1:/bin/bash Which among the following will print userid and home dir in the following pattern “user1:/home/user1”
Correct Answer

(A) awk `{print $1 ":" $6}` /etc/passwd

[#742] What is the output of the following program? [ -n $HOME ]
echo $?
[ -z $HOME ]
echo $?
Correct Answer

(A) 0 1

[#743] The file /proc/devices is the
Correct Answer

(C) text listing of major numbers & device groups

[#744] Which of the following is true?
Correct Answer

(C) Shell is a wrapper for all the commands and utilities

[#745] For debugging with GDB, the file "example" can be created with the command
Correct Answer

(A) gcc -g -o example example.c