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.)
"b1 c1" | |
"b2 c3" | |
"b1 c2" | |
"b1 c3" |
Question 2 |
An example of a memory management system call in UNIX is
fork | |
mmap
| |
sigaction | |
execve
|
Question 3 |
Which command is used to remove the read permission of the file ‘note’ from both the group and others?
chmodgo+r note
| |
chmodgo+rw note | |
chmod go-x note | |
chmod go-r, 4-x note |
Question 4 |
Which of the following commands can be used to get information about individual terminal?
who am i | |
pwd | |
i/u | |
which
|
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 ______
cmp file1 file2
| |
comm file1 file2 | |
diff file1 file2
| |
comp file1 file2 |
Question 6 |
We can append to a file instead of overwriting by using the
>>symbols | |
>symbols | |
< |
Question 7 |
Which of the following is not a filter?
cat | |
wc | |
grep
| |
sort |
Question 8 |
chmod u–w,o+x file 1 | |
chmod u-w,o-w file 1 | |
cheperum u-w, o+e file 1 | |
chmod u-w,o+e file 1 |
Question 9 |
sorts the lines of the file 1 in ascending order and place | as delimiter | |
sorts the lines of the file 1 in descending order and place | as delimiter | |
sorts the lines of the file 1 in ascending order after skipping content upto | in each line | |
sorts the lines of the file 1 in descending order after skipping content upto | in each line |
Question 10 |
cmp file 1 file 2 | |
comm. File 1 file 2 | |
diff file 1 file 2 | |
comp file 1 file 2 |