Explore topic-wise MCQs in Computer Science.

This section includes 133 Mcqs, each offering curated multiple-choice questions to sharpen your Computer Science knowledge and support exam preparation. Choose a topic below to get started.

101.

Which of the following commands is used to rename a file?

A. rename
B. remove
C. mv
D. ren
Answer» D. ren
102.

Which of the following command is used to go to home directory?

A. cd..
B. cd/
C. cd
D. cd HOME.
Answer» D. cd HOME.
103.

Which operator will be used with chmod command to assign absolute permission?

A. +
B. -
C. =
D. %
Answer» D. %
104.

Which option will be used with ps command to slow the entire command line of the process being run?

A. -4
B. #NAME?
C. -1
D. -2
Answer» C. -1
105.

Which of the following commands can be used to get information about all users who are currently logged into the system?

A. which
B. who
C. who am i
D. 1 /u
Answer» C. who am i
106.

Which command is used to make all files and sub-directories in the directory (progs) executable by all users?

A. chmod -R a+x progs
B. chmod -R 222 progs
C. chmod -1 a+x progs
D. chmod -x a+x progs
Answer» B. chmod -R 222 progs
107.

Which of the following commands is used to display your working directory?

A. dir
B. prompt $p$g
C. pwd
D. path
Answer» D. path
108.

Which set option is used with vi editor to display line numbers on screen?

A. nm
B. nu
C. ic
D. li
Answer» C. ic
109.

Which symbol is used to separate more than one command in the same command line?

A. $
B. #
C. :
D. ;
Answer» E.
110.

Which of the following commands is used to update access and modification times of a file?

A. grep
B. wc
C. touch
D. cat
Answer» D. cat
111.

Which command is used to remove the read permission of the file 'note' from both the group and others?

A. chmod go+r note
B. chmod go+rw note
C. chmod go-x note
D. chmod go-r note
Answer» E.
112.

The commonly used UNIX commands like date, ls, cat, etc. are stored in

A. /dev directory
B. /bin and /usr/bin directories
C. /tmp directory
D. /unix directory
Answer» C. /tmp directory
113.

Which of the following special shell variables is used to process number of the current shell?

A. $!
B. $$
C. $0
D. $*
Answer» C. $0
114.

In vi editor, forward search is performed using the command.

A. :pat
B. ?pat
C. /pat
D. All of the above
Answer» D. All of the above
115.

Which command is used to concatenate all files beginning with the string 'emp' and followed by a non-numeric characters?

A. cat emp[!0-9]
B. more [emp][!0-9]
C. cat emp[x-z]
D. cat emp[a-z]
Answer» B. more [emp][!0-9]
116.

Which of command is used to copy a file?

A. copy
B. cp
C. cpio
D. tar
Answer» C. cpio
117.

Which command is used to remove a file?

A. remove
B. rm
C. mv
D. del
Answer» C. mv
118.

Which of the following commands is used to list contents of directories?

A. ls
B. lp
C. dir
D. tar
Answer» B. lp
119.

The % key allows you

A. to move the cursor to a matching delimiter, when a delimiters a parenthesis, a bracket, or a brace.
B. to move the cursor to the upperleft corner of the screen
C. to move the cursor backward to the beginning of a word
D. to move the cursor to the first column in the current line
Answer» B. to move the cursor to the upperleft corner of the screen
120.

Which command is used to display a file contents in octal form?

A. cd
B. od
C. of
D. oct
Answer» C. of
121.

Which command is used to display the characteristics of a process?

A. pid
B. du
C. ps
D. au
Answer» D. au
122.

Which of the following keys is used to move the cursor to the end of the paragraph.

A. }
B. {
C. |
D. $
Answer» B. {
123.

Which of the following commands is used to identify the type of file by context?

A. ls
B. cat
C. file
D. more
Answer» D. more
124.

The command used to compare the files is known as

A. comp
B. cmp
C. do
D. ccp
Answer» C. do
125.

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
Answer» B. ls -l
126.

Which command is used to sort the lines of data in a file in reverse order

A. sort
B. sh
C. st
D. sort -r
Answer» E.
127.

Which of the following files contains information related to password aging?

A. Shadow
B. password
C. profile
D. All the three
Answer» C. profile
128.

Which option is used with rm command to make the command prompt the user with each filename and a ?, before acting on it

A. -r
B. #NAME?
C. #NAME?
D. -1
Answer» D. -1
129.

The File that contains a set of instructions which are performed when a user logs in, is

A. .exrc
B. .profile
C. .autoexec
D. autoexec.bat
Answer» C. .autoexec
130.

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?
Answer» B. chmod 777 emp*
131.

Which command will be used with vi editor to insert text to left of cursor?

A. s
B. S
C. a
D. i
Answer» E.
132.

The agency that sits between the user and the UNIX system is called the

A. logic
B. profile
C. shell
D. erxc
Answer» D. erxc
133.

Which command is used to display and create files?

A. cat
B. vi
C. ed
D. lyrix
Answer» B. vi