Linux/Unix Solved MCQs

The advantage of binary files over text files is that

It is compact
It can be accessed faster
Many commands assume the named file to be a binary file
They are more reliable
      _____________________________________________________________________________________
UNIX was developed by

Bell labs
Berkley software
California university
American defence academy
      _____________________________________________________________________________________
Mounting a file system results in the loading of

Boot block
Super block
i-node table
All of these
      _____________________________________________________________________________________
Profilers are

Tools that analyze the run time behavior of a program
Tools that check C code for cross file consistency
Tools that keep track of evolving versions of a file
None of the above
      _____________________________________________________________________________________
Which command is used to extract specific columns from the file?

cut
grep
Past
cat
      _____________________________________________________________________________________
Which of the following system calls,does not return control to the calling point, on termination?

Fork
Exec
Ioct1
Longjmp
      _____________________________________________________________________________________
 The Unix command used to find out the number of characters in a file is

nc
wc
chcnt
c
      _____________________________________________________________________________________
Which command is used to display the characteristics of a process?

pid
ps
du
au
      _____________________________________________________________________________________
The command that can be used to restrict incoming messages to a user is

Mesg
Halt
Grep
Sleep
      _____________________________________________________________________________________
Which command is used to remove a file

Rename
MV
RM
Del
      _____________________________________________________________________________________
When a process makes a system call ,its mode changes from

User to kernel
Kernel to user
Restricted to unrestricted
Unrestricted to restricted
      _____________________________________________________________________________________
Which of the following file names can be found in more than one directory?

Passwd
Bin
Date
None of the above
      _____________________________________________________________________________________
Which of the following are not system calls?

Chmod
Open
Lseek
Getc
      _____________________________________________________________________________________
Which of the following files contains information related to password aging?

Shadow
Profile
Password
All of these
      _____________________________________________________________________________________
Environment variables can be accessed by

System programs
C programs
Shell scripts
None of the above
      _____________________________________________________________________________________
Which of the following system calls transforms an executable binary file into a process?

Fork
Exec
Ioct1
Longjmp
      _____________________________________________________________________________________
Which command allows you to view your file 24 lines at a time ?

More
Cat
Pg
None of the above
      _____________________________________________________________________________________
Which of the following keys is used to replace a single character with new text?

S
s
r
C
      _____________________________________________________________________________________
Which command will be used with vi editor to append text at end of line?

A
i
a
I
      _____________________________________________________________________________________
An attempt to read from locked file,results in

Prematured termination
A deadlock
An indefinite wait
None of the above
      _____________________________________________________________________________________
The tail command in UNIX

Can be used to look at the tail or bottom of the file
Can be used to display the list of last 10 files in the current directory
Can be used to display the list of last 15 in the current directory
None of the above
      _____________________________________________________________________________________
Which command is used to display the device name of the terminal you are using?

who
ls
tty
stty
      _____________________________________________________________________________________
Which of the following shell scripts looping features does not recognize the break command?

While
Until
For
None of the above
      _____________________________________________________________________________________
Kernel is not involved

When a read operation is done
When a pressed key is echoed on to the screen
In resource allocation
None of the above
      _____________________________________________________________________________________
The file that stores an integer as a sequence of characters is a

Text file
Data file
Binary file
Core
      _____________________________________________________________________________________
Which of the following command the file names in multiple columns?

IS–X
IS
IS–1
IS–f–X
      _____________________________________________________________________________________
Which of the following is not a communication command?

Write
Mail
Mesg
Grep
      _____________________________________________________________________________________
The sort command in UNIX

Used to sort a file
Used to sort the list of files in a directory
Both A and B
None of the above
      _____________________________________________________________________________________
Which of the following changes permission to deny write permission to group and others?

Chmod go-w filex
Chmod go w filex
Chmod go=w file
None of the above
      _____________________________________________________________________________________
Which command is used to create a directory?

CRDIR
MKDIR
MD
CR
      _____________________________________________________________________________________
Which one of the following options is not a shell in UNIX system?

Bourne Shell
C Shell
Net Shell
Korn Shell
      _____________________________________________________________________________________
Which of the following tools can be used to keep track of evolving version of a file?

Make
Yacc
SCCS
dv
      _____________________________________________________________________________________
Which of the following commands is used to count the total number of lines,words and characters contained in a file?

count p
wcount
wc
count w
      _____________________________________________________________________________________
Which of the following statement best explains a process?

It is a program.
It is a program in execution.
It is an instance of a program in execution.
It is a program that uses system calls.
      _____________________________________________________________________________________
Files that can store data in the same format as used in program are called

Binary files
Source file
Text file
Core
      _____________________________________________________________________________________
Which of the following sections of an executable binary file has all uninitialized data items?

BSS
Data
Header
Symbol
      _____________________________________________________________________________________
Shell functions

Are another name for shell procedures
Execute faster than shell procedures
Are executed by a new shell
Are not executed by new shell
      _____________________________________________________________________________________
Command_________compares two files byte by byte and displays the first mismatch.

cmp
comp
cmap
None of these
      _____________________________________________________________________________________
Which command is used to change protection mode of files starting with the string emp and ending with 1,2, or 3?

chmod 777 emp*
chmod u x emp[l-3]
chmod u r ??? emp
chmod 222 emp?
      _____________________________________________________________________________________
Which of the following commands is used for an automatic remainder service?

Write
Calender
Mail
Mesg
      _____________________________________________________________________________________
In which section of a process,the information about the arguments to the program are available?

Data
Text
Stack
User block
      _____________________________________________________________________________________
If cat x ,prints garbage ,then x is probably a

Data file
Binary file
Text file
Source file
      _____________________________________________________________________________________
Which of the following calls never returns an error?

Getpid
Fork
Ioct1
Open
      _____________________________________________________________________________________
The tar command in UNIX

Used to create compressed archives of directories and files
Used to extract directories and files from an archives
Both A and B
None of the above
      _____________________________________________________________________________________
Which command is used to display a file contents in octal form?

cd
of
od
oct
      _____________________________________________________________________________________
To allow only one user to work with a particular file at a particular time ,one has to

Semaphore
Critical region
Locking
Dedicated mode
      _____________________________________________________________________________________
Which command is used with vi editor to delete a single character?

Z
y
a
x
      _____________________________________________________________________________________
The cat command is used to

Print a file
Display a file
Capture a file
Copy a file
      _____________________________________________________________________________________
Which command is used with vi editor to move the cursor to the left?

i
k
j
h
      _____________________________________________________________________________________
Which of the following is not a filter?

cat
wc
grep
sort
      _____________________________________________________________________________________
Previous Post Next Post