Unix/Lunux/Unix MCQ Sample Test,Sample questions

Question:
 If rmdir dir001 fails, what could be the reason(s)?

1.dir001 doesn’t exist

2.dir001 is not empty

3.permissions of dir001 doesn’t allow to remove it

4.dir001 doesn’t exist, dir001 is not empty and permissions of dir001 doesn’t allow to remove it


Question:
 In Unix, for what purpose bc command is used?

1.for copying files

2.as a process table viewer

3.as an editor

4.as a calculator


Question:
 In which language UNIX is written?

1.C++

2.C

3.JAVA

4.Python


Question:
 Sometimes we are unable to create a directory because ______________

1.the directory may already exist in the current directory

2.there may be an ordinary file by the same name in the current directory

3.the permissions set for the current directory does not allow the creation

4.the directory may exist, there may be an ordinary file, the permissions set for the current directory does not allow the creation


Question:
 To extract specific columns from a file ____ command is used.

1.cut

2.pr

3.head

4.tail


Question:
 Which command is used for changing the current directory?

1.cd

2.cp

3.pwd

4.rm


Question:
 Which command is used for displaying the beginning of a file in Unix?

1.lp

2.begin

3.pr

4.head


Question:
 Which command is used for preparing a file for printing?

1.pr

2.print

3.cat

4.cd


Question:
 Which command is used for printing the current working directory?

1.HOME

2.cd

3.pwd

4.dir


Question:
 Which command is used for removing/deleting files in Unix?

1.rm

2.mv

3.rmdir

4.del


Question:
 Which command is used to delete all files in a directory?

1.del *

2.rm *

3.mv *

4.rmdir *


Question:
 Which command is used to find out the consumption of a specific directory?

1.mem

2.dv

3.du

4.df


Question:
 Which process is immediately set up by the kernel when we log on to a Unix system?

1.System

2.bash

3.shell

4.parent


Question:
 Which Unix command is used for counting words, lines, and characters in a file?

1.wc

2.man

3.count

4.diff


Question:
 Which Unix command is used for locating files?

1.type

2.loc

3.find

4.search


Question:
$ cp file_01 . copies the file named file_01 in ____ directory

1.current

2.parent

3.root

4.user


Question:
echo command is used for _________
 

1.displaying diagnostic messages

2.displaying date and time

3.displaying errors

4.displaying operating system details


Question:
For moving two level up in the file hierarchy system using cd command once, we separates ( . . ) by which symbol?

1.?

2.$

3.*

4./


Question:
For running a Unix command within awk, we’ve to use ____ function.

1.split

2.system

3.substr

4.length


Question:
How can we escape to the UNIX shell without quitting vi editor?

1.using ‘:sh’ command and using ctrl-Z

2.using ‘:sh’ command

3.using ctrl-Z

4.using ctrl-D


Question:
The output of the following command is __________

$ cp  abd/ .user_06

1.copies .user_06 file in current directory

2.copies .user_06 file in parent directory of directory named abd

3.undefined behaviour

4.erroneous output


Question:
The Unix shell is both _______ and _______ language.

1.scripting, interpreter

2.high level, low level

3.interactive, responsive

4. interpreter, executing


Question:
To run the script, we should make it executable first by using _____

1.chmod +w

2.chmod +rwx

3.chmod +x

4.chmod +r


Question:
What does the following command do?

    $ mkdir dir   dir/dir_01/dir_02

1.create dir, dir_01 and dir_02

2.creates dir_02

3.creates dir only

4.throws an error


Question:
What is a shell script?

1.group of functions

2.a file containing a series of commands

3.a file containing special symbols

4.group of commands


Question:
What is the default delimiter used by the cut command for cutting fields?

1.space

2.underscore

3.tab

4.double tab


Question:
What is the function of cp command in Unix?

1.delete a given file

2.change the directory

3.list all the available files in the current directory

4.cp is a command used for copying files and directories


Question:
What is the output of the following Unix command?

$ wc  -c  *.c

1.size of each .c file

2.total size of .c files

3.erroneous

4.undefined


Question:
What is Unix?

1.Unix is a programming language

2.Unix is a software program

3. Unix is an operating system

4.Unix is a text editor


Question:
Which command is used by the user to change their login password in Unix?

1.cp

2.man

3.reset

4.passwd


Question:
Which command is used for comparing two files?
 

1.comp

2.cmp

3.comm

4.diff


Question:
Which command is used for creating directories?

1.rmdir

2.mkdir

3.cd

4.cp


Question:
Which command is used for creating directories?

1.rmdir

2.mkdir

3.cd

4.cp


Question:
Which command is used for displaying the contents of a file in Unix?

1.mkdir

2.cat

3.rm

4.cp


Question:
Which command is used for listing files in a directory?

1.ps

2.list

3.ls

4.wc


Question:
Which command is used for listing files in a directory?

1.list

2.ls

3.wc

4.ps


Question:
Which command is used for printing the current working directory?

1.dir

2.HOME

3.cd

4.pwd


Question:
Which command is used for removing an empty directory?

1.mkdir

2.rmdir

3.del

4.remove


Question:
Which command is used for renaming files in Unix?

1.rename

2.move

3.mv

4.cp


Question:
Which command is used for saving and quitting the vi editor simultaneously?

1.‘:x’

2.:f

3.:q

4. :w


Question:
Which command is used for sorting a file on specified fields?

1.pr

2.cut

3.tail

4.sort


Question:
Which command is used for translating characters?

1.paste

2.tr

3.trans

4.sort


Question:
Which command is used to compress files?

1.gzip

2.gunzip

3.comm

4.cmp


Question:
Which command is used to display the documentation of commands in Unix?

1.man

2.whatis

3.help

4.search


Question:
Which command shows some attributes of a process?

1.HOME

2.ps

3.$$

4.pid


Question:
Which editor is used by the Unix system to edit files?

1.word

2.notepad++

3.vi

4.notepad


Question:
Which filter apart from perl, is the most powerful?

1.awk

2.grep

3.cut

4.sed


Question:
Which filter apart from perl, is the most powerful?

1.awk

2.grep

3.cut

4.sed


Question:
Which of the following cannot be performed by cat command?

1.appending files

2.deleting files

3.creating files

4.displaying files


Question:
Which of the following command is used for searching for a pattern in one or more file(s)?

1.paste

2.grep

3.cd

4.cp


Question:
Which of the following command will be used for searching “director” in emp.lst?

1.grep “director” emp.lst

2.grep -director emp.lst

3.grep -v “director” emp.lst

4.grep “director”


Question:
Which of the following commands is known as stream editor?

1.grep

2.tr

3.sed

4.td


Question:
Which of the following files are known as special files in Unix?

1./dev/null

2.sample.txt

3./dev/null and /dev/tty

4./dev/tty


Question:
Which of the following is not a feature of Unix?

1.multiuser

2.easy to use

3.multitasking

4.portability


Question:
Which of the following is not a part of all the versions of Unix?

1.System Calls

2.Graphical user interface

3.Kernel and Shell

4.Commands and utilities


Question:
Which of the following is not an internal command used by mailx?

1.d

2.N

3.a

4.q


Question:
Which of the following is not true about Unix?

1.UNIX was not written in ‘C’ language

2. Linux is also known as a version of UNIX

3.A user can run multiple programs at the same time; hence UNIX is called a multitasking environment

4. Many people can use a UNIX based computer at the same time; hence UNIX is called as a multiuser system


Question:
Which of the following is the first UNIX editor?

1.vi

2.emacs

3.ed

4.ed


Question:
Which of the following keys is used to replace a single character with new text?

1.S

2.s

3.r

4.C


Question:
Which of the following system call is used for creating a new process in Unix?

1.new

2.wait

3.read

4.fork


Question:
Which option is used with ls command for long listing of files with seven attributes?

1.-a

2.-l

3.-x

4.-i


Question:
Which part of the Unix operating system interacts with the hardware?

1.Application program

2.Vi editor

3.Shell

4.Kernel


Question:
Which symbol is used with the tail command to print the file from the selected line?
d) 

1. %%

2.^

3.+

4.–


Question:
Which Unix command is used for changing the current directory?

1.pwd

2.rm

3.cd

4.cp


Question:
Which Unix command is used for locating repeated and non-repeated lines?

1.cut

2.paste

3.uniq

4.sort


More MCQS

  1. Unix MCQS Set 1
  2. Unix MCQS Set 2
  3. Unix MCQS Set 3
  4. Unix MCQS Set 4
  5. Linux Mcqs Questions Set 1
  6. Linux Mcqs Questions Set 2
  7. Linux Mcqs Questions Set 3
  8. Linux Mcqs Questions Set 4
  9. Linux Mcqs Questions Set 5
  10. Linux Mcqs Questions Set 6
  11. Linux Mcqs Questions Set 7
  12. Linux Mcqs Questions Set 8
  13. Linux Mcqs Questions Set 9
  14. Linux Mcqs Questions Set 10
  15. Linux Mcqs Questions Set 11
  16. Linux Mcqs Questions Set 12
  17. Linux Mcqs Questions Set 13
  18. Linux Mcqs Questions Set 14
  19. Unix MCQ Set 01
  20. Unix MCQ Set 02
  21. UNIX SYSTEM Mcq
  22. Unix MCQ
  23. Linux MCQ Unit 1
  24. Linux MCQ Unit 2
  25. LINUX MCQ QUESTIONS AND ANSWER
  26. Linux File Permissions MCQ Questions Answers
  27. Linux Administration MCQ question and answer
  28. Linux MCQ QUESTIONS AND ANSWER
Learn Unix MCQ,Learn Unix/Lunux Objetive choice questions and answers,Unix/Lunux Multiple choice questions and answers,Unix/Lunux objective, Unix/Lunux questions , Unix/Lunux answers,Unix/Lunux MCQs questions and answer
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!