Welcome Guest

Unix Questions for AMDOCS

Q. No. :1
Question :Which will display only unique lines from foo?
A :
sort -n foo
B :
sort -u foo
C :
unique foo
D :
sed foo
Answer: B
Q. No. :2
Question :In vi editor to delete a single character
A :
dd is used
B :
y is used
C :
R is used
D :
x is uded
Answer: D
Q. No. :3
Question :Which will print the first five lines of file?
A :
tail +5 foo
B :
head -n 5 foo
C :
cut -f5- foo
D :
sed -n '5' foo
Answer: B
Q. No. :4
Question :For killing the last background job
A :
kill $! is used
B :
kill -s is used
C :
kill -9 is used
D :
kill $0 is used
Answer: A
Q. No. :5
Question :The system identifies the end of a file by the
A :
EOF cahracter
B :
file size
C :
i-node number
D :
None
Answer: B
Q. No. :6
Question :Which of the following UNIX tools receives input only from standard input?
A :
awk
B :
grep
C :
sed
D :
tr
Answer: D
Q. No. :7
Question :The shell command cat x y > x
A :
doesn't work
B :
replaces the contents of the file x, by the contents of file y
C :
does nothing, other than displaying an error message
D :
None
Answer: B
Q. No. :8
Question :Which command would you use to change the priority of a running process?
A :
nice
B :
ps
C :
top
D :
ls
Answer: A
Q. No. :9
Question :tail +11 emp.txt will
A :
show 11th line from start
B :
11th line onwards from start
C :
11th line onwards from end
D :
start to 11th line
Answer: B
Q. No. :10
Question :PID is used by the system to identify
A :
a process
B :
the file name
C :
the i-noed
D :
all of the above
Answer: A
Q. No. :11
Question :Which is the Shell of UNIX?
A :
bash
B :
dash
C :
Korn
D :
Bourne
Answer: D
Q. No. :12
Question :Which command is used to display the output of a command as well as store it in a file ?
A :
cat
B :
grep
C :
tee
D :
vi
Answer: C
Q. No. :13
Question :What is the command to connecto to remote terminals?
A :
ping
B :
telnet
C :
ftp
D :
mime
Answer: B
Q. No. :14
Question :Which of the following results in an error?
A :
expr 4+5
B :
expr 9-3
C :
expr 2*3
D :
expr 7/5
Answer: C
Solution
Q. No. :15
Question :In vi editor to move forward to beginning of word
A :
b is used
B :
e is used
C :
w is used
D :
f is used
Answer: C
Q. No. :16
Question :Which of the following file names cannot be displayed if ls * is run?
A :
-Xy
B :
#x
C :
.x
D :
hidden
Answer: C
Q. No. :17
Question :which command is used to go to end of line in vi editor?
A :
e
B :
w
C :
$
D :
b
Answer: C
Q. No. :18
Question :The command cat > x
A :
is invalid
B :
creates a file x and displays an error message
C :
creates a file x and waits for the user to give input from keyboard
D :
none
Answer: C
Q. No. :19
Question :To assign all premissions to the owner, read and write premissions to the group, and only execute permissions to the others
A :
chmod 711 is used
B :
chmod 761 is used
C :
chmod 621 is used
D :
chmod 614 is used
Answer: B
Q. No. :20
Question :Redirection in pipes can be achieved by using
A :
>
B :
>>
C :
tee
D :
lpr
Answer: C
Q. No. :21
Question :File x.c has 5 lines of code. The command
date | tee abc | sort -x.c | wc -l

displays
A :
5
B :
6
C :
0
D :
an error message
Answer: B
Q. No. :22
Question :if file has 000 permission then
A :
root can only read the file
B :
any user can read the file
C :
root can read and write the file
D :
root can read write as well as execute the file
Answer: C
Q. No. :23
Question :$$ gives
A :
PID of current shell
B :
PID of last background job
C :
Exit status of last command
D :
All parameters as a single string
Answer: A