R4RIN
MCQS
Unix/Lunux MCQ Quiz Hub
Unix MCQ Set 02
Choose a topic to test your knowledge and improve your Unix/Lunux skills
1. Which command is used with vi editor scroll half page backward?
[Control-d]
[Control - u]
Control-(c]
[Control -P]
2. Which command is used to terminate a process?
shutdown
haltsys
cancel
kill
3. Which of the following commands is used to save the output of the who command in a file named user.lst, as well as display it?
who | tee user.lst
who > user.lst
who >> user.lst
who < user.lste
4. Which command is used to display the top of the file?
cat
head
more
grep
5. The first set of the three permissions (rw) pertains to the owner of the file, indicating that the owner has
Executable permission only
Write and executable permissions
Both read and executable permissions
Both read and write permissions
6. Which of the following commands is used to obtain a list of all files by modification time?
ls -1
ls -t
ls -i
ls -R
7. Which option will be used with disk free command to include the total amount of disk space in the file system?
-t
-tt
-4
-i
8. Which command allows you to view your file 24 lines at a time?
more
pg
cat
lp
9. Which command is used to display the characteristics of a process?
pid
du
ps
au
10. Which of the following keys is used to overstrike a whole line?
R
v
C
u
11. Which option will be used with ps command to show the entire command line of the process being run?
-4
-f
-1
-2
12. Which command is used to list all the files with extension .lst?
ls -l *.lst
ls lst*
ls *.*
ls *[lst]
13. Which of the following special shell variables is used to process number of the current shell?
$!
$$
$0
$*
14. Which option will be used with touch command to change the access time?
-a
-b
-t
-h
15. Which command is used with vi editor to search a pattern in the forward direction?
/
?
//
??
16. Which command is used with vi editor to move the cursor to the left?
i
j
k
h
17. Which command is used to change protection mode of files starting with the string emp and ending with 1,2, or 3?
chmod u+x emp[1-3]
chmod 777 emp*
chmod u+r ??? emp
chmod 222 emp?
18. Which command is used to change directory to the name beginning with a 'p'?
cd p
cd p?
cd p*
cd [p]
19. Which command is used with vi editor to move cursor forward to first occurrence of character 'ch' in the current line?
tch
tch
rch
ech
20. The command to count the number of files in the current directory by using pipes, is
ls | wc
ls -l | wc -l
ls | wc -w
ls | ws -c
21. Which symbol is used to separate more than one command in the same command line?
$
#
:
;
22. Which of the following commands is used to remove files?
erase
delete
rm
dm
23. The command chmod 761 note is equivalent to
chmod 167 note
chmod u=rwx, g=rw, o=x note
chmo a =761 note
chmod 4=7, g=6,0 =1 note
24. Which of the following commands is used to display the filenames in multiple columns?
ls
ls -1
ls -x
lc
25. The field separator in cut command is specified with
-a option
-d option
-r option
-x option
26. Which command is used to print a file?
print
prn
pg
lp
27. Which of the following keys is used to move the cursor to the end of the paragraph.
}
{
|
$
28. Which of the following set options is used with vi editor to ignore case while searching for patterns?
ic
ai
sm
ts
29. Which of the following commands is used to view your file 24 lines at a time?
pg
cat
lp
/p
30. Which of the following directories contain all the Alias created by a user, including his login directory?
/tmp
/etc
/usr
/dev
31. Which command is used to display and create files?
cat
vi
ed
lyrix
32. In Bourne shell, which file sets the Unix environment for the user when the logs into his HOME directory.
.exrc
.profile
lastlogin
.mbox
33. Which of the following commands is used to display the directory attributes rather than its contents?
ls -l -d
ls -l
ls -x
ls -F
34. Which of the following commands is used to summarize the disk usage?
chkdsk
fdisk
du
disk
35. The agency that sits between the user and the UNIX system is called the
logic
profile
shell
erxc
36. Which command is used to remove a directory?
rd
rmdir
dldir
rdir
Submit