Unix Quiz
Unix Quiz contain set of 10 MCQ questions for Unix MCQ which will help you to clear beginner level quiz.
1. Which symbol will be used with grep command to match the pattern pat at the beginning of a line?
A. ^pat
B. $pat
C. pat$
D. pat^
2. Which command is used to sort the lines of data in a file in reverse order
A. sort
B. sh
C. st
D. sort -r
3. Which command is used to display the top of the file?
A. cat
B. head
C. more
D. grep
4. Which of the following commands is used to display the directory attributes rather than its contents?
A. ls -l -d
B. ls -l
C. ls -x
D. ls -F
5. Which of the following files will displayed by this command cat *ch*
A. patch
B. catch
C. .ch
D. All of the above
6. Which of the following is not a communication command.
A. write
B. mesg
C. mail
D. grep
7. Which command will be used with vi editor to replace text from cursor to right?
A. r
B. R
C. s
D. S
8. Which of the following commands is used to rename a file?
A. rename
B. remove
C. mv
D. ren
9.Which of the following command is used to count just the number of lines contained in a file?
A. wc -l
B. wc -c
C. wc -w
D. wc -r
10.Which of the following command is used to go to home directory?
A. cd..
B. cd/
C. cd
D. cd HOME.