0% found this document useful (0 votes)
105 views3 pages

First Quiz 2018 Odd

This document contains 20 multiple choice questions about UNIX and shell programming. Some key topics covered include: UNIX being a multi-user system, the root directory being denoted by "/", the dev directory containing files for controlling input/output, the vi editor starting in command mode by default, and grep being used to search for patterns in files and print matching lines.

Uploaded by

veenarajeev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
105 views3 pages

First Quiz 2018 Odd

This document contains 20 multiple choice questions about UNIX and shell programming. Some key topics covered include: UNIX being a multi-user system, the root directory being denoted by "/", the dev directory containing files for controlling input/output, the vi editor starting in command mode by default, and grep being used to search for patterns in files and print matching lines.

Uploaded by

veenarajeev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Maharaja Instititue of Technology Mysore

Department of Master of Computer Applications

Subject Code: 18MCA12 UNIX and Shell Programming Max.Time: 15Min

1. In UNIX resources are shared by all the users , so UNIX is ___________________ system
a. Multiuser b. featureless c. portable d. multitasking
Ans ___________
2. Root directory in UNIX is denoted by
a. – b. / c. () d.\
Ans ___________
3. dev directory contain files for controlling ____________________
a. input / output b. OS
b. both a and b
c. none
4. Unix operating System is an ___________________.
a. Time sharing Operating System
b. Multi-User Operating System
c. multi-tasking Operating System
d. All the above
5. How do you get help about the command “cp”?
a. help cp
b. man cp
c. ca ?
d. cat cp
6. Which command is used with vi editor to move the cursor one row up?
a. i
b. j
c. h
d. k
7. _________________ works as a command interpreter
a. Hardware
b. Shell
c. Kernel
d. CPU
8. vi always starts in __________ mode
a. command
b. insert
c. last line
d. ex
9. Which command is used to copy all files having the string chap and any two characters after that
to the progs directory?
a. cp chap* progs
b. cp chap?? progs
c. cp chap[12] /progs/*.*
d. None of these
10. How can you append he output of command to file?
a. command < file
b. command << file
c. command > file
d. command >> file
11. When you execute a script call test at $prompt as $test hi hello then test will be stored in ____
posititonal parameter
a. $#
b. $*
c. $0
d. $1
12. _____________ pathname uses the current directory as point of reference for the file
a. Relative
b. Absolute
c. Both a and b
d. None of these
13. For logical AND and OR operator _________ options is used
a. –a , -o
b. –c , -d
c. –a, -c
d. –a, -d
14. Which of the following are used as loops?
a. for
b. while
c. Both a and b
d. None of these
15. Which command is used to extract specific columns from the file?
a. cat
b. grep
c. cut
d. paste
16. ___________ command copies to output those lines in the input that match a specified patter
a. cut
b. paste
c. echo
d. grep
17. Full form of grep is _______________________
a. Globally search with Regular Expressions and Print
b. Global Read Expression and Print
c. Goto Regular Expression and Print
d. None of above
18. Which symbol will be used with grep command to match the pattern pat in the beginning of a
line?
a. ^pat
b. $pat
c. pat$
d. pat^
19. what is output of the following command
20.

You might also like