MCQOPTIONS
Saved Bookmarks
This section includes 9 Mcqs, each offering curated multiple-choice questions to sharpen your Technical MCQs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which of the following filter is used to remove duplicate lines? |
| A. | cat |
| B. | sed |
| C. | uniq |
| D. | grep |
| E. | |
| Answer» D. grep | |
| 2. |
Which of the following is not filter in unix? |
| A. | cat |
| B. | head |
| C. | tail |
| D. | cd |
| Answer» E. | |
| 3. |
If there are special characters in a pattern, then we've to enclose them in ______ |
| A. | single quotes |
| B. | double quotes |
| C. | Without any quotes |
| D. | None of the above |
| Answer» C. Without any quotes | |
| 4. |
Which option is used ignores first x fields when sorting? |
| A. | -x |
| B. | +x |
| C. | -X |
| D. | +X |
| Answer» C. -X | |
| 5. |
Which command is used to arranges lines of text alphabetically or numerically? |
| A. | sort |
| B. | psort |
| C. | asort |
| D. | series |
| Answer» B. psort | |
| 6. |
What does -c operation do in grep command? |
| A. | Matches either upper or lowercase. |
| B. | Prints only the count of matching lines. |
| C. | Prints the matched line and its line number. |
| D. | Prints all lines that do not match pattern. |
| Answer» C. Prints the matched line and its line number. | |
| 7. |
Which command searches a file or files for lines that have a certain pattern? |
| A. | erep |
| B. | pgrp |
| C. | grep |
| D. | drep |
| Answer» D. drep | |
| 8. |
To make a pipe, put a ________ on the command line between two commands. |
| A. | | |
| B. | / |
| C. | \ |
| D. | $ |
| Answer» B. / | |
| 9. |
What is true about pipes in unix? |
| A. | Pipe can connect two commands together so that the output from one program becomes the input of the next program |
| B. | To make a pipe, put a hash (#) on the command line between two commands. |
| C. | Two or more commands connected in this way form a pipe. |
| D. | Both A and C |
| Answer» E. | |