Unix/Lunux/UNIX SYSTEM Mcq Sample Test,Sample questions

Question:
	
A part of Windows 2000 operating system that is not portable is

1.Device Management

2.Virtual Memory Management

3.Processor Management

4.User Interface

Posted Date:-2022-06-04 02:04:39


Question:
	
A Unix file may be of the type :

1.Regular file

2.Directory file

3.Device file

4.Any one of the above

Posted Date:-2022-06-04 01:58:57


Question:
	
An example of a memory management system call in UNIX is:

1. fork

2.mmap

3.sigaction

4.execve

Posted Date:-2022-06-04 04:33:28


Question:
	
Assume that an implementation of Unix operating system uses i-nodes to keep track of data blocks allocated to a file. It supports 12 direct block addresses, one indirect block address and one double indirect block address. The file system has 256 bytes block size and 2 bytes for disk block address. The maximum possible size of a file in this system is

1.16 MB

2.16 KB

3.70 KB

4. None of the above

Posted Date:-2022-06-04 04:02:51


Question:
	
Everything below the system call interface and above the physical hardware is known as ______. 

1.Kernel

2.Bus

3.Shell

4.Stub

Posted Date:-2022-06-03 12:16:40


Question:
	
Find the odd man out:

1. tail

2.cut

3.wart

4. sed

Posted Date:-2022-06-04 04:30:16


Question:
	
In Linux, the subdirectory that contains system configuration files including user passwords:

1. /boot

2./usr

3./etc

4./proc

Posted Date:-2022-06-04 04:40:04


Question:
	
In Unix operating system, special files are used to :

1.buffer data received in its input from where a process reads

2.provide a mechanism to map physical device to file names

3.store list of file names plus pointers associated with i-nodes

4. store information entered by a user application program or utility program

Posted Date:-2022-06-04 02:57:18


Question:
	
In UNIX, processes that have finished execution but have not yet had their status collected are known as ................

1.Sleeping processes

2.Stopped Processes

3.Zombie Processes

4.Orphan Processes

Posted Date:-2022-06-04 02:18:11


Question:
	
In UNIX, ______________ creates three subdirectories: 'PIS' and two subdirectories 'progs' and data from just created subdirectory 'PIS'.

1.mdkir PIS/progs PIS/data PIS

2.mkdir PIS progs data

3.mkdir PIS PIS/progs PIS/data

4.mkdir PIS/progs data

Posted Date:-2022-06-04 02:07:58


Question:
	
Match the following in Unix file system :

List - I                         List - II
(a) Boot block               (i) Information about file system
(b) Super block            (ii) Information about file
(c) Inode table              (iii) Storage space
(d) Data block               (iv) Code for making OS ready

Codes :
      (a)  (b)  (c)  (d)

1. (iv) (i) (ii) (iii) b.

2. (i) (iii) (ii) (iv) c.

3. (iii) (i) (ii) (iv)

4.(iv) (ii) (i) (iii)

Posted Date:-2022-06-04 03:58:11


Question:
	
Match the following vi commands in Unix:
List-I                   List-II
a.   :w        i. saves the file and quits
editing mode
b.   :x         ii. escapes unix shell
c.   :q         iii. saves file and remains
in editing mode
d. :sh       iv. quits editing mode and
no changes are saved to
the file

Codes:
     a   b  c  d

1.ii iii i iv

2.iv iii ii i

3.iii iv i ii

4.iii i iv ii

Posted Date:-2022-06-04 02:12:27


Question:
	
Match the following with reference to Unix shell scripts : 

List-I                                                     List-II

a. $?                                 i.  File name of the current script

b. $#                                ii.  List of arguments

c. $0                                 iii. The number of arguments

d. $*                                  iv. Exit status of last command

Codes:
a       b       c       d

1.iii ii i iv

2.ii iii i iv

3. iv iii i ii

4. i iii i iv

Posted Date:-2022-06-04 02:05:51


Question:
	
The environment variable in Linux, that contain a list of directories the shell automatically recognizes.

1.$PATH

2.$ENV

3.$USER

4.$GREP

Posted Date:-2022-06-04 04:38:41


Question:
	
The Unix command :

$ vi file1 file2

1.Edits file1 and stores the contents of file1 in file2

2.Both files i.e. file1 and file2 can be edited using 'ex' command to travel between the files

3.Both files can be edited using 'mv' command to move between the files

4.Edits file1 first, saves it and then edits file2

Posted Date:-2022-06-04 02:02:33


Question:
	
Which of the following option with reference to UNIX operating system is not correct?

1. INT signal is sent by the terminal driver when one types < Control-C > and it is a request to terminate the current operation.

2.TERM is a request to terminate execution completely. The receiving process will clean up its state and exit.

3.QUIT is similar to TERM, except that it defaults to producing a core dump if not caught.

4.KILL is a blockable signal.

Posted Date:-2022-06-04 02:41:03


Question:
	
Which of the following OS treats hardware as a file system?

1.UNIX

2.DOS

3.Windows NT

4.None of the above

Posted Date:-2022-06-04 04:32:24


Question:
	
Which of the following out commands will output "onetwothree"?

1.for val; do echo-n $val; done < one two three

2.for one two three; do echo-n-; done

3. for n in one two three; do echo-n $n; done

4.for n in one two three {echo-n $n}

Posted Date:-2022-06-04 04:01:42


Question:
	
Which of the following shell scripts will produce the output “my first script” ?

1.for i in my first script { echo –i $i}

2.for my first script; do echo –n; done

3.for i in my first script; do echo –i $i; done

4.for n in my first script; do echo –i $i; done

Posted Date:-2022-06-04 04:05:27


Question:
	
Which of the following statement is not correct with reference to cron daemon in UNIX O.S?

1.The cron daemon is the standard tool for running commands on a pre-determined schedule.

2.It starts when the system boots and runs as long as the system is up.

3. Cron reads configuration files that contain list of command lines and the times at which they invoked.

4.Cron reads configuration files that contain list of command lines and the times at which they invoked.

Posted Date:-2022-06-04 02:47:56


Question:
	
Which one of the following options is not a shell in UNIX system?

1.Bourne Shell

2.C Shell

3.Net Shell

4. Korn Shell

Posted Date:-2022-06-04 04:21:35


Question:
	
Which or the following commands would return process_id of sleep command?

1.Sleep 1 and echo $?

2. Sleep 1 and echo #

3.Sleep 1 and echo $*

4. Sleep 1 and echo $!

Posted Date:-2022-06-04 01:53:49


Question:
12.	
Match the following for Unix system calls:

List – I List – II

(a) exec (i) Creates a new process

(b) brk (ii) Invokes another program overlaying memory space with a copy of an executable file

(c) wait (iii) To increase or decrease the size of data region

(d) fork (iv) A process synchronizes with termination of child process

code:
a b c d

1.(ii) (iii) (iv) (i)

2. (iii) (ii) (iv) (i)

3. (iv) (iii) (ii) (i)

4. (iv) (iii) (i) (ii)

Posted Date:-2022-06-04 02:00:11


Question:
 In Unix, how do you check that two given strings a and b are equal?

1.test $a -eq $b

2.test $a -equal $b

3.test $a = $b

4.both a and c

Posted Date:-2022-06-04 01:50:24


Question:
A system call in Linux operating system to create a new child process, which is a copy of the parent process:

1.access

2.fork

3.flock

4.exec

Posted Date:-2022-06-04 04:37:49


Question:
A Unix file may be of the type :

1.Regular file

2.Directory file

3.Device file

4. Any one of the above

Posted Date:-2022-06-04 01:57:23


Question:
A UNIX file system has 1 KB block size and 4-byte disk addresses. What is the maximum file size if the inode contains ten direct block entries, one single indirect block entry, one double indirect block entry and one triple indirect block entry?

1.30 GB

2.64 GB

3.16 GB

4. 1 GB

Posted Date:-2022-06-04 04:18:44


Question:
A unix file system has 1-KB blocks and 4-byte disk addresses. What is the maximum file size if i-nodes contain 10 direct entries and one single, double and triple indirect entry each?

1.32 GB

2.64 GB

3.16 GB

4.1 GB

Posted Date:-2022-06-04 02:55:24


Question:
A user level process in Unix traps the signal sent on a Ctrl + C input and has a signal handling routine that saves appropriate files before terminating the process. When a Ctrl + C input is given to this process, what is the mode in which the signal handling routine executes ?

1.User mode

2.Kernel mode

3.Superuser mode

4. Privileged mode

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


Question:
An example of a directory found in most UNIX system is:

1.usr

2.waitpid

3.brk

4.unmap

Posted Date:-2022-06-04 04:34:17


Question:
Consider the following operations to be performed in Unix:

“The pipe sorts all files in the current directory modified in the month of “June” by order of size and prints them to the terminal screen. The sort option skips ten fields then sorts the lines in numeric order.”

Which of the following Unix command will perform above set of operations?

1.ls – l | grep “June” | sort + 10n

2.ls – l | grep “June” | sort + 10r

3.ls – l | grep – v “June” | sort + 10n

4.ls – l | grep – n “June” | sort + 10x

Posted Date:-2022-06-04 02:15:23


Question:
Consider the following statements :

(a) UNIX provides three types of permissions
* Read
* Write
* Execute
(b) UNIX provides three sets of permissions
* permission for owner
* permission for group
* permission for others

Which of the above statement/s is/are true?

1. Only (a)

2. Only (b)

3.Both (a) and (b)

4.Neither (a) nor (b)

Posted Date:-2022-06-04 04:44:06


Question:
Consider the following UNIX command:

sort < in > temp; head -30 < temp; rm temp

Which of the following functions shall be performed by this command?

1.Sort, taking the input from "temp", prints 30 lines from temp and delete the file temp

2.Sort the file "temp", removes 30 lines from temp and delete the file temp

3.Sort, taking the input from "in" and writing the output to "temp" then prints 30 lines from temp on terminal. Finally "temp" is removed

4. Sort, taking the input from 'temp" and then prints 30 lines from "temp" on terminal. Finally "temp" is removed

Posted Date:-2022-06-04 04:14:37


Question:
In Unix, files can be protected by assigning each one a 9-bit mode called rights bits. Now, consider the following two statements:

I. A mode of 641 (octal) means that the owner can read and write the file, other members of the owner’s group can read it, and users can execute only. Which of the following options is correct with reference to above statements?

1.Only I is correct

2.Only II is correct

3.Both I and II are correct

4. Both I and II are incorrect

Posted Date:-2022-06-04 02:51:51


Question:
In Unix, the command to enable execution permission for file “mylife” by all is ................

1.Chmod ugo+X myfile

2.Chmod a+X myfile

3.Chmod +X myfile

4.All of the above

Posted Date:-2022-06-04 04:00:14


Question:
In Unix, the login prompt can be changed by changing the contents of the file ...............

1. contrab

2.init

3.gettydefs

4.inittab

Posted Date:-2022-06-04 02:53:57


Question:
In UNIX, which of the following command is used to set the task priority ?

1.init

2.nice

3.kill

4.PS

Posted Date:-2022-06-03 12:12:09


Question:
Linux operating system uses

1.Affinity Scheduling

2. Fair Preemptive Scheduling

3.Hand Shaking

4.Highest Penalty Ratio Next

Posted Date:-2022-06-03 12:17:50


Question:
Linux partitions are created using the file system:

1.FAT

2.FAT32

3. EXT3

4.NTFS

Posted Date:-2022-06-04 04:41:22


Question:
Match the following WINDOWS system calls and UNIX system calls with reference to process control and File manipulation.

Windows
(a) Create - process ()
(b) WaitForSingleObject ()
(c) CreateFile ()
(d) CloseHandle ()

UNIX
(i) Open ()
(ii) Close ()
(iii) Fork ()
(iv) Wait ()

Code :
(a) (b) (c) (d)

1.(iii) (iv) (i) (ii)

2.(iv) (iii) (i) (ii)

3.(iv) (iii) (ii) (i)

4. (iii) (iv) (ii) (i)

Posted Date:-2022-06-04 04:45:32


Question:
The “nice” command is used in Unix:

1.to decrease the priority of a process

2.to increase the priority of a process

3. to get the highest priority

4. both a and b

Posted Date:-2022-06-04 04:35:23


Question:
The directory structure used in Unix file system is called

1.Hierarchical directory

2.Tree structured directory

3.Directed acyclic graph

4.Graph structured directory

Posted Date:-2022-06-04 01:51:33


Question:
The mv command changes

1. the inode

2.the inode-number

3.the directory entry

4.both the directory entry and the inode

Posted Date:-2022-06-04 04:15:53


Question:
The output generated by the LINUX command :
                     $ seq 1 2 10 
will be

1.1 2 10

2.1 2 3 4 5 6 7 8 9 10

3.1 3 5 7 9

4.1 5 10

Posted Date:-2022-06-04 02:06:55


Question:
The Unix command used to find out the number of characters in a file is

1.nc

2.wc

3.chcnt

4. lc

Posted Date:-2022-06-04 04:28:35


Question:
The Unix Kernel maintains two key data structures related to processes, the progress table and the user structure. Which of following information is not the part of user

1. File descriptor table

2.System call state

3. Scheduling parameters

4. Kernel stack

Posted Date:-2022-06-04 01:56:06


Question:
The Unix Operating System Kernel maintains two key data structures related to processes, the process table and the user structure. Now, consider the following two statements:

I. The process table is resident all the time and contain information needed for all processes, even those that are not currently in memory.
II. The user structure is swapped or paged out when its associated process is not in memory, in order not to waste memory on information that is not needed.

Which of the following options is correct with reference to above statements ?

1.Only (I) is correct

2.Only (II) is correct

3.Both (I) and (II) are correct

4. Both (I) and (II) are wrong

Posted Date:-2022-06-04 02:14:02


Question:
Unix command to change the case of first three lines of file “shortlist” from lower to upper

1.$ tr ‘[a-z]’ ‘[A-Z]’ shortlist | head-3

2.$ head-3 shortlist | tr ‘[a-z]’ ‘[A-Z]’

3.$ tr head-3 shortlist ‘[A-Z]’ ‘[a-z]’

4.$ tr shortlist head-3 ‘[a-z]’ ‘[A-Z]’

Posted Date:-2022-06-04 02:11:15


Question:
What does the following command do ?
grep − vn  "abc" x

1. It will print all of the lines in the file x that match the search string "abc"

2.It will print all of the lines in file x that do not match the search string "abc"

3.It will print total no of the lines in file x that match the search string "abc"

4.It will print the specific line numbers of file x in which there is a match for the string "abc"

Posted Date:-2022-06-04 01:55:00


Question:
What is the function of following UNIX command?

WC – l < a >b&

1.It runs the word count program to count the number of lines in its input, a, writing the result to b, as a foreground process.

2. It runs the word count program to count the number of lines in its input, a, writing the result to b, but does it in the background.

3. It counts the errors during the execution of a process, a, and puts the result in process b.

4.It copies the ‘ l ’ numbers of lines of program from file, a, and stores in file b.

Posted Date:-2022-06-04 02:42:56


Question:
Which command allows you to view your file 24 lines at a time ?

1.More

2.Cat

3.Pg.

4. None of the above

Posted Date:-2022-06-04 04:22:30


Question:
Which of the following changes permission to deny write permission to group and others?

1.Chmod go-w filex

2.Chmod go w filex

3.Chmod go=w filex

4.None of the above

Posted Date:-2022-06-04 04:31:23


Question:
Which of the following flags are set when ‘JMP’ instruction is executed ?

1.SF and CF

2.AF and CF

3.All flags

4.No flag is set

Posted Date:-2022-06-03 12:13:40


Question:
Which of the following information about the UNIX file system is not correct?

1.Super block contains the number of i-nodes, the number of disk blocks, and the start of the list of free disk blocks.

2.An i-node contains accounting information as well as enough information to locate all the disk blocks that holds the file’s data.

3.Each i-node is 256-bytes long

4.All the files and directories are stored in data blocks

Posted Date:-2022-06-04 02:39:57


Question:
Which of the following is not an Unix Command ?

1.Whoami

2.wc

3.is

4. put

Posted Date:-2022-06-04 04:36:12


Question:
Which of the following set of Unix commands will always display “WELCOME” ?

1.export title=WELCOME; Echo $title

2. title = WELCOME; export $ title ; sh –c “echo $title”

3.title = WELCOME; export title ; sh –c “echo $title”

4. title = WELCOME; echo $title

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


Question:
Which of the following statement(s) is/are True regarding ‘nice’ command of UNIX?

I. It is used to set or change the priority of a process.
II. A process’s nice value can be set at the time of creation.
III. ‘nice’ takes a command line as an argument.

1.I, II only

2.II, III only

3.I, II, III

4. I, III only

Posted Date:-2022-06-04 02:17:00


Question:
Which of the following statements is not true for UNIX Operating System ?

1.Major strength of UNIX Operating System is its open standards which enabled large number of organizations ranging from academicia to industries to participate in its development.

2.UNIX kernel uses modules with well specified interfaces and provides advantages like simplified testing and maintenance of kernel. It has better extensibility as the kernel is not monolithic.

3.UNIX is kernel based operating system with two main components viz. process management subsystem and file management subsystem.

4. All devices are represented as files which simplify the management of I/O devices and files. The directories structure used is directed acyclic graph.

Posted Date:-2022-06-04 04:12:57


Question:
Which statement  is not true about process 0 in the Unix operating system?

1.Process 0 is called init process

2.Process 0 is not created by fork system call

3.After forking process 1, process O becomes swapper process

4.Process 0 is a special process created when system boots

Posted Date:-2022-06-04 01:52:42


Question:
Which statement is not correct about “init” process in Unix?

1.It is generally the parent of the login shell.

2.It has PID 1.

3.It is the first process in the system.

4.Init forks and execs a ‘getty’ process at every port connected to a terminal.

Posted Date:-2022-06-04 02:09:11


Question:
Which UNIX/Linux command is used to make all files and sub-directories in the directory “progs” executable by all users?

1.chmod −R a+x progs

2.chmod −R 222 progs

3.chmod −X a+x progs

4.chmod −X 222 progs

Posted Date:-2022-06-04 04:42:47


Question:
WOW32 is a :

1.Win 32 API library for creating processes and threads

2.Special kind of file system to the NT name space

3.Kernel - mode objects accessible through Win 32 API

4.Special execution environment used to run 16 bit Windows applications on 32 - bit machines

Posted Date:-2022-06-04 02:01:23


Question:
_______ maintains the list of free disk blocks in the Unix file system.

1.I-node

2.Boot block

3. Super block

4. File allocation table

Posted Date:-2022-06-04 02:03:21


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!