On This Page

This set of Unix Operating System Multiple Choice Questions & Answers (MCQs) focuses on Unix Operating System Set 3

Q1 | On executing a statement set -3+1
  • $1 would be -3
  • $1 would be –
  • $1 would be set
  • this command would result into an error
Q2 | On executing the command Shift $v
  • the positional parameters would be shifted by the value of the variable v
  • the positional parameters would be shifted by 1
  • the positional parameters would not be shifted at all
  • this command would result into an error
Q3 | Which of the following shows the correct hierarchy of arithmetic operations in shell
  • (),**,* or /, + or –
  • (), **, *,/,+,-
  • (),**,/,*,+,-
  • (),/,% or *,- or +
Q4 | Which of the following is allowed in an arithmetic statement involving exprinstruction
  • []
  • {}
  • ()
  • none of the above
Q5 | The statement z=’expr 5/2’ would store in z a value
  • 2.5
  • 3
  • 2
Q6 | The expression expr -7 % 2evaluates to
  • 1
  • -1
  • -3.5
Q7 | The expression expr -2 % 7 evaluates to
  • 2
  • -2
  • 0.285
Q8 | Hierarchy decides which operator
  • is most important
  • is used first
  • is fastest
  • operates on largest numbers
Q9 | The break statement is used to exit from
  • an if statement
  • a for loop
  • a program
  • none of the above
Q10 | An until loop ensures that the statement within the loop get executed
  • only once
  • atleast once
  • not even once
  • none of the above
Q11 | Which option will be used with sort command to start sorting after the nth column of the (m+1)th field
  • –m.n
  • +m.n
  • +n.m+1
  • +(m+1).n
Q12 | Which command is used to terminate a process
  • shutdown
  • haltsys
  • cancel
  • kill
Q13 | The command is used to compare the files is known as
  • comp
  • cmp
  • do
  • ccp
Q14 | The command which transcribes the standard input to the standard output and also makes a copy of the same in a file is
  • tee
  • tr
  • sort
  • grep
Q15 | Which command is used to remove a directory
  • rd
  • rmdir
  • dldir
  • rdir
Q16 | Which command is used to extract a specific columns from the file
  • cat
  • cut
  • grep
  • paste
Q17 | Which command sends the word count of the file infile to the newfile.
  • wcinfile>newfile
  • wcnewfile
  • wcinfile - newfile
  • wcinfile | newfile
Q18 | Which command is used to remove the read permission of the file 'note' from both the group and others?
  • chmodgo+r note
  • chmodgo+rw note
  • chmod go-x note
  • chmod go-r, 4-x note
Q19 | Which command is used to concatenate all files beginning with the string 'emp' and followed by a non-numeric characters?
  • cat emp[!0-9]
  • more [emp][!0-9]
  • cat emp[x-z]
  • cat emp[a-z]
Q20 | Which command will be used with vi editor to insert text to left of cursor?
  • s
  • s
  • a
  • i
Q21 | In vi editor, forward search is performed using the command.
  • :pat
  • :pat
  • /pat
  • all of the above
Q22 | Which of the following special shell variables is used to process number of the last background job?
  • $!
  • $#
  • $0
  • $*
Q23 | Which option will be used with ps command to slow the entire command line of the process being run?
  • -4
  • -f
  • -1
  • -4
Q24 | Which of the following command addresses all users who are currently hooked on?
  • write
  • mail
  • wall
  • mesg