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

Posted Date:-2022-06-20 07:02:36


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

Posted Date:-2022-06-19 12:56:46


Question:
 In which language UNIX is written?

1.C++

2.C

3.JAVA

4.Python

Posted Date:-2022-06-19 12:03:31


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

Posted Date:-2022-06-20 07:00:35


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

1.cut

2.pr

3.head

4.tail

Posted Date:-2022-06-20 06:44:35


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

1.cd

2.cp

3.pwd

4.rm

Posted Date:-2022-06-20 06:56:23


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

1.lp

2.begin

3.pr

4.head

Posted Date:-2022-06-19 12:34:54


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

1.pr

2.print

3.cat

4.cd

Posted Date:-2022-06-20 06:27:36


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

1.HOME

2.cd

3.pwd

4.dir

Posted Date:-2022-06-20 06:55:24


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

1.rm

2.mv

3.rmdir

4.del

Posted Date:-2022-06-19 12:40:32


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

1.del *

2.rm *

3.mv *

4.rmdir *

Posted Date:-2022-06-19 12:37:39


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

1.mem

2.dv

3.du

4.df

Posted Date:-2022-06-20 06:39:38


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

Posted Date:-2022-06-20 06:22:15


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

1.wc

2.man

3.count

4.diff

Posted Date:-2022-06-19 12:44:38


Question:
 Which Unix command is used for locating files?

1.type

2.loc

3.find

4.search

Posted Date:-2022-06-20 06:26:07


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

1.current

2.parent

3.root

4.user

Posted Date:-2022-06-20 07:08:40


Question:
echo command is used for _________
 

1.displaying diagnostic messages

2.displaying date and time

3.displaying errors

4.displaying operating system details

Posted Date:-2022-06-19 12:38:32


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

1.?

2.$

3.*

4./

Posted Date:-2022-06-20 07:10:45


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

1.split

2.system

3.substr

4.length

Posted Date:-2022-06-20 06:43:45


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

Posted Date:-2022-06-19 12:47:05


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

Posted Date:-2022-06-20 07:09:46


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

1.scripting, interpreter

2.high level, low level

3.interactive, responsive

4. interpreter, executing

Posted Date:-2022-06-19 12:02:07


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

Posted Date:-2022-06-20 06:38:37


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

Posted Date:-2022-06-20 06:59:23


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

Posted Date:-2022-06-20 06:36:56


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

1.space

2.underscore

3.tab

4.double tab

Posted Date:-2022-06-20 06:49:13


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

Posted Date:-2022-06-19 12:39:40


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

Posted Date:-2022-06-19 12:55:23


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

Posted Date:-2022-06-19 11:55:16


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

1.cp

2.man

3.reset

4.passwd

Posted Date:-2022-06-19 12:29:35


Question:
Which command is used for comparing two files?
 

1.comp

2.cmp

3.comm

4.diff

Posted Date:-2022-06-19 12:43:16


Question:
Which command is used for creating directories?

1.rmdir

2.mkdir

3.cd

4.cp

Posted Date:-2022-06-20 06:57:09


Question:
Which command is used for creating directories?

1.rmdir

2.mkdir

3.cd

4.cp

Posted Date:-2022-06-20 06:58:05


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

1.mkdir

2.cat

3.rm

4.cp

Posted Date:-2022-06-19 12:31:24


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

1.ps

2.list

3.ls

4.wc

Posted Date:-2022-06-20 07:12:30


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

1.list

2.ls

3.wc

4.ps

Posted Date:-2022-06-19 12:28:07


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

1.dir

2.HOME

3.cd

4.pwd

Posted Date:-2022-06-19 12:27:06


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

1.mkdir

2.rmdir

3.del

4.remove

Posted Date:-2022-06-20 07:01:29


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

1.rename

2.move

3.mv

4.cp

Posted Date:-2022-06-19 12:42:19


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

1.‘:x’

2.:f

3.:q

4. :w

Posted Date:-2022-06-19 12:45:53


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

1.pr

2.cut

3.tail

4.sort

Posted Date:-2022-06-20 06:28:22


Question:
Which command is used for translating characters?

1.paste

2.tr

3.trans

4.sort

Posted Date:-2022-06-20 06:30:08


Question:
Which command is used to compress files?

1.gzip

2.gunzip

3.comm

4.cmp

Posted Date:-2022-06-19 12:34:04


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

1.man

2.whatis

3.help

4.search

Posted Date:-2022-06-19 12:23:42


Question:
Which command shows some attributes of a process?

1.HOME

2.ps

3.$$

4.pid

Posted Date:-2022-06-20 06:23:22


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

1.word

2.notepad++

3.vi

4.notepad

Posted Date:-2022-06-19 12:18:55


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

1.awk

2.grep

3.cut

4.sed

Posted Date:-2022-06-20 06:40:46


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

1.awk

2.grep

3.cut

4.sed

Posted Date:-2022-06-20 06:42:28


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

1.appending files

2.deleting files

3.creating files

4.displaying files

Posted Date:-2022-06-20 06:47:33


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

Posted Date:-2022-06-20 06:34:49


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”

Posted Date:-2022-06-20 06:31:38


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

1.grep

2.tr

3.sed

4.td

Posted Date:-2022-06-20 06:35:51


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

Posted Date:-2022-06-19 12:48:51


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

1.multiuser

2.easy to use

3.multitasking

4.portability

Posted Date:-2022-06-19 12:05:59


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

Posted Date:-2022-06-19 12:20:23


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

1.d

2.N

3.a

4.q

Posted Date:-2022-06-20 06:50:41


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

Posted Date:-2022-06-19 12:12:16


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

1.vi

2.emacs

3.ed

4.ed

Posted Date:-2022-06-19 12:04:33


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

1.S

2.s

3.r

4.C

Posted Date:-2022-06-20 07:06:08


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

1.new

2.wait

3.read

4.fork

Posted Date:-2022-06-20 06:24:37


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

1.-a

2.-l

3.-x

4.-i

Posted Date:-2022-06-20 07:15:59


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

1.Application program

2.Vi editor

3.Shell

4.Kernel

Posted Date:-2022-06-19 12:21:39


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

1. %%

2.^

3.+

4.–

Posted Date:-2022-06-19 12:36:01


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

1.pwd

2.rm

3.cd

4.cp

Posted Date:-2022-06-19 12:24:49


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

1.cut

2.paste

3.uniq

4.sort

Posted Date:-2022-06-20 06:29:14


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
Search
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!