Unix MCQ
Unix MCQ
ago.
Select an answer
A.
TRUE---B.
FALSE
Which command is used to remove a directory?
Select an answer
A.
Rd
B.
Rmdir---C.
Dldir
D.
Rdir
Simple form of synchronization between parent and child.int wait (int *
statloc );
Select an answer
A.
TRUE--B.
FALSE
We can redirect the error messages to alternate location using the error
redirection operator.
Select an answer
A.
TRUE--B.
FALSE
In UNIX, fork is a system call that creates a new pcb.
Select an answer
A.
TRUE
B.
FALSE---
C.
D.
Cat
Cd
Select an answer
A.
TRUE
B.
FALSE---File name is case sensitive.
Select an answer
A.
TRUE---B.
FALSE
Which of the following is not the filter command?
(Please select ALL that apply)
Select an answer
A.
Head--B.
Grep
C.
:w--D.
Ex--E.
Uniq---
Select an answer
A.
I/o Processors
B.
CPU
C.
Printer--D.
All the options are correct
Which command list hidden files?
Select an answer
A.
ls-l
B.
ls-a--C.
ls-h
D.
ls-If
Which symbol is used for output redirection operator?
Select an answer
A.
>----B.
<
C.
>>
D.
<<
The file limit for UNIX, LINUX is up to 255 characters.
Select an answer
A.
TRUE----B.
FALSE
The role of assemblers is a basic machine that passes through a program.
Select an answer
A.
TRUE----B.
FALSE
Which symbol is used to specify a group of character?
Select an answer
A.
()
B.
{}
C.
[]---------D.
<>
alphasort() and versionsort() functions are used as the comparison
function.
Select an answer
A.
TRUE---B.
FALSE
Which command is used to copy files from one location to another
location?
Select an answer
A.
Which
B.
Cd
C.
CP--D.
None of the options are correct
Read() is what kind of a class?
Select an answer
A.
Input / Output Class---B.
Random Access
C.
Channel Duplication
D.
File Status
Which option will be used with ps command to slow the entire command line
of the process being run?
Select an answer
A.
-4
B.
-f--C.
-1
D.
-4
UNIX maintains the information about a process in two areas, they are:
Select an answer
A.
Process Table and User Area---B.
State and Pid
C.
Signals Pending and Priority
D.
Size and Pointers
Which symbol is used for merging the standard error message to the same
output file?
Select an answer
A.
>
B.
&
C.
&&
D.
None of the options are correct-------Equivalent command for find . -name "*.dat" -ok rm {} \;
Select an answer
A.
find . -name "*.dat" -exec rm -i {} \;
B.
rm *.dat----------C.
erase *.dat all
D.
None
Signal for system calls is:
Select an answer
A.
Signal---B.
Kill
C.
Alarm
D.
All the options are correct
Which are types of storage for file format?
Select an answer
A.
Directories---B.
Data
C.
Program
D.
All the options are correct
A.
B.
C.
D.
Set---Env
Is
Echo
C.
D.
Relocation---Macros
Which command is used to remove the read permission of the file note from
both the group and others?
Select an answer
A.
chmodgo+r note
B.
chmodgo+rw note
C.
chmod go-x note
D.
chmod go-r, 4-x note------Choose a valid Logical Test expression to check a non-numeric value with
another value.
Select an answer
A.
if test $v1 eq $ v2---B.
if $v1 = $v2
C.
if test $v1 = $v2
D.
if test $v1 == $v2
The Octal number to be given along with chmod command to make a file
readable, writable, and executable to the owner, readable and executable
to group and others is:
Select an answer
A.
0
B.
755--C.
744
D.
555
Only a few system calls are needed to implement process control in UNIX.
They are:
Select an answer
A.
Ls
B.
intgetpid--C.
Ls only
D.
intgetpid only
E.
Both Ls and intgetpid
F.
None of options are correct
How do we display the last second line of a file?
Select an answer
A.
tail -2 filename | head 1
B.
cat filename | tail -3 | head -1
C.
tail +2 filename | head -1 | tail 1--D.
None of the options are correct
A file contains, employee information like code name, department, salary
in this format, with colon(:) as delimiter. How do we display the highest
salary drawing 2 people all the details?
Select an answer
A.
cat emp.dat | tr ":" " " |sort +2 | head -2----B.
sort emp.dat | head -2
C.
sort -t":" +2 emp.dat | tr ":" " " | cut -d":" -f1,3
D.
None of the options are correct
Which is the valid command to display all the files with size 100 to 399
bytes occupied?
Select an answer
A.
ls -l | tr -s " " | cut -d" " -f1-5,9 | grep -w "[0-3][0-9][09]"
B.
ls -ls | cut -d" " -f1-5,9 | grep -w "[0-3][0-9][0-9]"---------C.
ls |cut -d" " -f1-5,9 | grep -w "[0-3][0-9][0-9]"
D.
None of the options are correct
Select an answer
A.
Appends three.txt contents with one.txt and two.txt--------B.
Displays one.txt two.txt and three.txt
C.
Error in Redirection
D.
None of the options are correct
Default permissions for a directory before unmask is:
Select an answer
A.
666
B.
777--C.
664
D.
754
The process table is located in kernel memory and cannot be swapped out.
Each entry contains:
Select an answer
A.
PID---B.
User ID
C.
State
D.
All the options are correct