MCQOPTIONS
Saved Bookmarks
This section includes 16 Mcqs, each offering curated multiple-choice questions to sharpen your Unix knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
When two files are identical, what is the output of diff command? |
| A. | Files are identical |
| B. | Returns prompt |
| C. | No output |
| D. | Throws an error |
| Answer» C. No output | |
| 2. |
Which command is used to display the differences between files? |
| A. | comm |
| B. | diff |
| C. | cmp |
| D. | differ |
| Answer» C. cmp | |
| 3. |
For comm command to work properly, files specified should be sorted. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 4. |
FOR_COMM_COMMAND_TO_WORK_PROPERLY,_FILES_SPECIFIED_SHOULD_BE_SORTED.?$ |
| A. | True |
| B. | False |
| Answer» B. False | |
| 5. |
When two files are identical, what is the output of diff command?$ |
| A. | Files are identical |
| B. | Returns prompt |
| C. | No output |
| D. | Throws an error |
| Answer» C. No output | |
| 6. |
Which command is used to display the differences between files?$ |
| A. | comm |
| B. | diff |
| C. | cmp |
| D. | differ |
| Answer» C. cmp | |
| 7. |
If we are interested in knowing that whether the two files are identical or not, we can use ___ command. |
| A. | comm |
| B. | diff |
| C. | cmp |
| D. | differ |
| Answer» D. differ | |
| 8. |
Which option is used to produce multi columnar output in diff command? |
| A. | -y |
| B. | -v |
| C. | -s |
| D. | -e |
| Answer» B. -v | |
| 9. |
What will be the command if we want to suppress column 1 and column 2 in the output of comm Command? |
| A. | comm -12 |
| B. | comm -1-2 |
| C. | comm -3 |
| D. | comm -1,-2 |
| Answer» B. comm -1-2 | |
| 10. |
Which command compares two sorted files line by line? |
| A. | cmp |
| B. | diff |
| C. | comm |
| D. | sort |
| Answer» D. sort | |
| 11. |
-b option is used with cmp command to print the differing bytes in both files. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 12. |
How can we skip some initial bytes from both the files to be compared? |
| A. | using -b option |
| B. | using -n option |
| C. | using -l option |
| D. | using -i option |
| Answer» E. | |
| 13. |
Which option is used with cmp command to limit the number of bytes to be compared? |
| A. | -n |
| B. | -l |
| C. | -f |
| D. | -b |
| Answer» B. -l | |
| 14. |
Which option is used with cmp command to display a detailed list of mismatches? |
| A. | -a |
| B. | -b |
| C. | -f |
| D. | -l |
| Answer» E. | |
| 15. |
What is the exit status of cmp command if both the files are identical? |
| A. | 0 |
| B. | 1 |
| C. | 2 |
| D. | undefined |
| Answer» B. 1 | |
| 16. |
Which command is used for comparing two files? |
| A. | cmp |
| B. | comp |
| C. | diff |
| D. | comm |
| Answer» B. comp | |