UNIX-Operating-System

Question 1

The contents of the text file t1.txt containing four lines are as follows:

a1 b1
a2 b2
a3 b2
a4 b1 

The contents of the text file t2.txt containing five lines are as follows:

a1 c1
a2 c2
a3 c3
a4 c3
a5 c4 

Consider the following Bourne shell script:

awk - F''' {Print S1, S2} ' t1.txt |
while read a b ; do
            awk -v aV = Sa - v bV = Sb - F''
            'aV = = S1 (print aV, bV, S2 )'t2.txt
done 

Which one of the following strings will NOT be present in the output generated when the above script in run? (Note that the given strings may be substrings of a printed line.)

A
"b1 c1"
B
"b2 c3"
C
"b1 c2"
D
"b1 c3"
       Operating-Systems       UNIX-Operating-System       GATE 2007-IT
Question 1 Explanation: 
Note: Out of syllabus.
Question 2

An example of a memory management system call in UNIX is

A
fork
B
mmap
C
sigaction
D
execve
       Operating-Systems       UNIX-Operating-System       APPSC-2016-DL-CA
Question 2 Explanation: 
Mmap is a memory management system call in UNIX.
Question 3

Which command is used to remove the read permission of the file ‘note’ from both the group and others?

A
chmodgo+r note
B
chmodgo+rw note
C
chmod go-x note
D
chmod go-r, 4-x note
       Operating-Systems       UNIX-Operating-System       APPSC-2016-DL-CA
Question 4

Which of the following commands can be used to get information about individual terminal?

A
who am i
B
pwd
C
i/u
D
which
       Operating-Systems       UNIX-Operating-System       APPSC-2016-DL-CA
Question 5

UNIX command used to compare the successive lines of file1 with the corresponding lines of file2 and output a 3-columnar report on lines unique to file1, file2 and common to both is ______

A
cmp file1 file2
B
comm file1 file2
C
diff file1 file2
D
comp file1 file2
       Operating-Systems       UNIX-Operating-System       APPSC-2016-DL-CA
Question 6

We can append to a file instead of overwriting by using the

A
B
>>symbols
C
>symbols
D
<
       Operating-Systems       UNIX-Operating-System       APPSC-2016-DL-CA
Question 7

Which of the following is not a filter?

A
cat
B
wc
C
grep
D
sort
       Operating-Systems       UNIX-Operating-System       APPSC-2016-DL-CA
Question 8
Consider the file named ‘file 1’. In order to remove write permission to the owner and grant execute permission to others, which of the following UNIX commands in appropriate?
A
chmod u–w,o+x file 1
B
chmod u-w,o-w file 1
C
cheperum u-w, o+e file 1
D
chmod u-w,o+e file 1
       Operating-Systems       UNIX-Operating-System       APPSC-2016-DL-CS
Question 9
The effect of executing the UNIX command ‘sort –t /| +1 file 1’ is ------
A
sorts the lines of the file 1 in ascending order and place | as delimiter
B
sorts the lines of the file 1 in descending order and place | as delimiter
C
sorts the lines of the file 1 in ascending order after skipping content upto | in each line
D
sorts the lines of the file 1 in descending order after skipping content upto | in each line
       Operating-Systems       UNIX-Operating-System       APPSC-2016-DL-CS
Question 10
UNIX command used to compare the successive lines of file 1 with the corresponding lines if file 2 and output a 3-columnar report on lines unique to file 1, file 2 and common to both is ----------------
A
cmp file 1 file 2
B
comm. File 1 file 2
C
diff file 1 file 2
D
comp file 1 file 2
       Operating-Systems       UNIX-Operating-System       APPSC-2016-DL-CS
There are 10 questions to complete.

Access quiz wise question and answers by becoming as a solutions adda PRO SUBSCRIBER with Ad-Free content

Register Now

If you have registered and made your payment please contact solutionsadda.in@gmail.com to get access