19th
May
Unix MCQ

Unix MCQ

  • Admin
  • 19th May, 2021
  • 1080 Followers

Unix MCQ Online Test

Following are mostly asked Unix MCQ test that are designed for professionals like you to crack you interviews. You can take this Unix online test before appearing to you real interview. This Unix quiz there are around 30+ multiple choice questions on Unix with four options.

1) What is a shell script?

  • A. a file containing a series of commands
  • B. a file containing special symbols
  • C. group of functions
  • D. group of commands

2) Shell scripts need to be saved with an extension .sh .

  • A. True
  • B. False

3) Shell scripts are executed in a separate child shell process:

  • A. True
  • B. False

4) The first line in any shell script begins with a ......

  • A. $
  • B. #
  • C. !
  • D. &

5) To run the script, we should make it executable first by using ......

  • A. chmod +r
  • B. chmod +w
  • C. chmod +x
  • D. chmod +rwx
Download Free : Unix MCQ PDF

6) To spawn a child of our own choice for running the script, we can use ........ command:

  • A. sh
  • B. ps
  • C. $$
  • D. pr

7) Which command is used for making the scripts interactive?

  • A. write
  • B. ip
  • C. input
  • D. read

8) read command is shell’s internal tool:

  • A. True
  • B. False

9) A single read statement can be used with one or more variables:

  • A. True
  • B. False

10) What are positional parameters?

  • A. pattern matching parameters
  • B. special variables and patterns
  • C. special variables for assigning arguments from the command line
  • D. special variables for reading user input

11) The first argument is read by the shell into the parameter .......

  • A. $$
  • B. 1$
  • C. $3
  • D. $1

12) The complete set of positional parameters is stored in ......... as a single string:

  • A. $*
  • B. $n
  • C. $#
  • D. $$

13) Which of the following is used for storing the number of positional parameters?

  • A. $*
  • B. $n
  • C. $2
  • D. $#

14) Which symbol will be used with grep command to match the pattern pat at the beginning of a line?

  • A. $pat
  • B. pat$
  • C. ^pat
  • D. pat^

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

  • A. st
  • B. sort -r
  • C. sort
  • D. sh

16) Which command is used to display the top of the file?

  • A. head
  • B. grep
  • C. cat
  • D. more

17) Which command is used to copy all files having the string chap and any two characters after that to the progs directory?

  • A. cp chap* progs
  • B. cp chap?? /progs/*
  • C. cp chap?? progs
  • D. cp chap[12] /progs/*.*

18) 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 u+r ??? emp
  • C. chmod 222 emp?
  • D. chmod 777 emp*

19) The command used to compare the files is known as:

  • A. comp
  • B. ccp
  • C. cmp
  • D. do

20) Which command is used to terminate a process?

  • A. kill
  • B. shutdown
  • C. cancel
  • D. haltsys

21) The cp command uses:

  • A. standard input file
  • B. standard output file
  • C. neither standard input nor standard output file
  • D. both input and output file

22) Which command is used to display and create files?

  • A. vi
  • B. cat
  • C. lyrix
  • D. ed

23) The second set of the three permissions (r-) indicates that:

  • A. other has read permission only
  • B. group has write permission only
  • C. group has read permission only
  • D. owner has read permission only

24) Which column contains all details of the permissions of a file when you issue the ls -l command?

  • A. first
  • B. second
  • C. third
  • D. fourth

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

  • A. prompt $p$g
  • B. dir
  • C. path
  • D. pwd

26) While working with mail command, which command is used to save mail in a separate file?

  • A. r
  • B. d
  • C. s
  • D. w

27) The field separator in cut command is specified with:

  • A. -x option
  • B. -r option
  • C. -d option
  • D. -a option

28) Which of the following directories contain all the Alias created by a user, including his login directory?

  • A. /usr
  • B. /tmp
  • C. /etc
  • D. /dev

29) 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 first column in the current line
  • C. to move the cursor to the upperleft corner of the screen
  • D. to move the cursor backward to the beginning of a word

30) ........can talk to the kernel:

  • A. Shell script
  • B. System instruction
  • C. Shell
  • D. System calls

1 comment(s) :

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
May
Android MCQ
01st
May
OOPs MCQ
01st
Jun
Database MCQ
01st
May
Maven MCQ
01st
Apr
Magento MCQ