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