MCQOPTIONS
Saved Bookmarks
This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
The command to count the number of files in the current directory by using pipes, is |
| A. | ls | wc |
| B. | ls -l | ws -l |
| C. | ls | wc -w |
| D. | ls | ws -c |
| Answer» D. ls | ws -c | |
| 2. |
Which of the following commands is used to get directory one level up? |
| A. | cd |
| B. | cd .. |
| C. | cd/ |
| D. | chdir |
| Answer» C. cd/ | |
| 3. |
Which command is used to list out all the hidden files along with the other files? |
| A. | ls -l |
| B. | ls -x |
| C. | ls -f |
| D. | ls -a |
| Answer» E. | |
| 4. |
Which command is used with vi editor to search a pattern in the forward direction? |
| A. | / |
| B. | ? |
| C. | // |
| D. | ?? |
| Answer» B. ? | |
| 5. |
Which command is used to print a file? |
| A. | |
| B. | prn |
| C. | pg |
| D. | lp |
| Answer» E. | |
| 6. |
The cp command uses: |
| A. | standard input file |
| B. | standard output file |
| C. | both input and output file |
| D. | neither standard input nor standard output file |
| Answer» E. | |
| 7. |
Which command is used to terminate a process? |
| A. | shutdown |
| B. | haltsys |
| C. | cancel |
| D. | kill |
| Answer» E. | |
| 8. |
Which of the following commands is used to display your working directory? |
| A. | second |
| B. | fourth |
| C. | third |
| D. | first |
| Answer» D. first | |
| 9. |
While working with mail command, which command is used to save mail i a separate file? |
| A. | s |
| B. | r |
| C. | w |
| D. | d |
| Answer» B. r | |
| 10. |
Which column contains all details of the permissions of a file when you issue the ls - l command? |
| A. | second |
| B. | fourth |
| C. | third |
| D. | first |
| Answer» E. | |
| 11. |
The second set of the three permissions (r-) indicates that |
| A. | group has read permission only |
| B. | other has read permission only |
| C. | owner has read permission only |
| D. | group has write permission only |
| Answer» B. other has read permission only | |
| 12. |
Which command is used to make all files and sub-directories in the directory (progs) executable by all users? |
| A. | chmod -r a+x progs |
| B. | chmod -r 222 progs |
| C. | chmod -1 a+x progs |
| D. | chmod -x a+x progs |
| Answer» B. chmod -r 222 progs | |
| 13. |
Which option will be used with touch command to change the access time? |
| A. | -a |
| B. | -b |
| C. | -t |
| D. | -h |
| Answer» B. -b | |
| 14. |
The filed separator in cut command is specified with |
| A. | -a option |
| B. | -d option |
| C. | -r option |
| D. | -x option |
| Answer» C. -r option | |
| 15. |
Which of the following commands is used to obtain a list of all files by modification time? |
| A. | ls -1 |
| B. | ls -t |
| C. | ls -i |
| D. | ls -r |
| Answer» C. ls -i | |
| 16. |
Which of the following directories contain all the Ales created by a user, including his login directory? |
| A. | /tmp |
| B. | /etc |
| C. | /usr |
| D. | /dev |
| Answer» D. /dev | |
| 17. |
Which of the following command addresses all users who are currently hooked on? |
| A. | write |
| B. | |
| C. | wall |
| D. | mesg |
| Answer» D. mesg | |
| 18. |
Which option will be used with ps command to slow the entire command line of the process being run? |
| A. | -4 |
| B. | -f |
| C. | -1 |
| D. | -4 |
| Answer» C. -1 | |
| 19. |
Which of the following special shell variables is used to process number of the last background job? |
| A. | $! |
| B. | $# |
| C. | $* |
| Answer» B. $# | |
| 20. |
In vi editor, forward search is performed using the command. |
| A. | :pat |
| B. | :pat |
| C. | /pat |
| D. | all of the above |
| Answer» E. | |
| 21. |
Which of the following commands is used to list contents of directories? |
| A. | ls |
| B. | lp |
| C. | dir |
| D. | tar |
| Answer» B. lp | |
| 22. |
Which command is used to count just the number of characters in a file? |
| A. | wc - 1 |
| B. | wc -c |
| C. | wc -w |
| D. | wc -r |
| Answer» C. wc -w | |
| 23. |
The agency that sits between the user and the UNIX system is called the |
| A. | logic |
| B. | profile |
| C. | shell |
| D. | erxc |
| Answer» D. erxc | |
| 24. |
Which of the following commands is used to update access and modification times of a file? |
| A. | grep |
| B. | wc |
| C. | touch |
| D. | cat |
| Answer» D. cat | |
| 25. |
Which symbol is used to separate more than one command in the same command line? |
| A. | $ |
| B. | # |
| C. | : |
| D. | ; |
| Answer» E. | |
| 26. |
The command which transcribes the standard input to the standard output and also makes a copy of the same in a file is |
| A. | tee |
| B. | tr |
| C. | sort |
| D. | grep |
| Answer» B. tr | |
| 27. |
Which command is used to concatenate all files beginning with the string 'emp' and followed by a non-numeric characters? |
| A. | cat emp[!0-9] |
| B. | more [emp][!0-9] |
| C. | cat emp[x-z] |
| D. | cat emp[a-z] |
| Answer» B. more [emp][!0-9] | |
| 28. |
Which of the following keys is used to move the cursor to the end of the paragraph. |
| A. | } |
| B. | { |
| C. | | |
| D. | $ |
| Answer» B. { | |
| 29. |
If you are to use [Control-c] as the interrupt key instead of [Del], then you will have to use |
| A. | tty ^c |
| B. | stty intr \\^c |
| C. | stty echoe |
| D. | stty echo \\^a |
| Answer» C. stty echoe | |
| 30. |
Which of the following files will displayed by this command cat *ch* |
| A. | patch |
| B. | catch |
| C. | .ch |
| D. | all of the above |
| Answer» E. | |
| 31. |
Which of the following commands is used to display the directory attributes rather than its contents? |
| A. | ls -1 -d |
| B. | ls -1 |
| C. | ls -x |
| D. | ls -f |
| Answer» B. ls -1 | |
| 32. |
Which command is used to remove the read permission of the file 'note' from both the group and others? |
| A. | chmod go+r note |
| B. | chmod go+rw note |
| C. | chmod go-x note |
| D. | chmod go-r, 4-x note |
| Answer» E. | |
| 33. |
Which command sends the word count of the file infile to the newfile. |
| A. | wc infile >newfile |
| B. | wc <infile >newfile |
| C. | wc infile - newfile |
| D. | wc infile | newfile |
| Answer» B. wc <infile >newfile | |
| 34. |
Which of the following keys is used to replace a single character with new text? |
| A. | s |
| B. | s |
| C. | r |
| D. | c |
| Answer» C. r | |
| 35. |
A pipe a mechanism that allow a stream of data between to be passed between…….. |
| A. | reader and writer process |
| B. | reader process |
| C. | writer process |
| D. | none of these |
| Answer» B. reader process | |
| 36. |
System call mknod creates a |
| A. | new file |
| B. | new directory |
| C. | new binary file |
| D. | none of these |
| Answer» C. new binary file | |
| 37. |
Which command is used to display the top of the file? |
| A. | cat |
| B. | head |
| C. | more |
| D. | grep |
| Answer» C. more | |
| 38. |
The file that stores an integer as a sequence of characters is a |
| A. | text file |
| B. | data file |
| C. | binary file |
| D. | core |
| Answer» B. data file | |
| 39. |
Files that can store data in the same format as used in program are called |
| A. | binary files |
| B. | source file |
| C. | text file |
| D. | core |
| Answer» B. source file | |
| 40. |
Which command is used to display and create files? |
| A. | cat |
| B. | ed |
| C. | vi |
| D. | lyrix |
| Answer» B. ed | |
| 41. |
Which is the earliest and most widely used shell that came with the UNIX system? |
| A. | c shell |
| B. | korn shell |
| C. | bourne shell |
| D. | smith shell |
| Answer» D. smith shell | |
| 42. |
Which of the following system calls,does not return control to the calling point, on termination? |
| A. | fork |
| B. | exec |
| C. | ioct1 |
| D. | longjmp |
| Answer» C. ioct1 | |
| 43. |
When the read system call encounters EOF ,it returns |
| A. | some positive integer |
| B. | some negative integer |
| C. | -1 |
| Answer» D. | |
| 44. |
Which command is used to display the characteristics of a process? |
| A. | pid |
| B. | ps |
| C. | du |
| D. | au |
| Answer» E. | |
| 45. |
Command compares two files byte by byte and displays the first mismatch. |
| A. | cmp |
| B. | comp |
| C. | cmap |
| D. | none of these |
| Answer» B. comp | |
| 46. |
The cat command is used to |
| A. | print a file |
| B. | display a file |
| C. | capture a file |
| D. | copy a file |
| Answer» C. capture a file | |
| 47. |
Which of the following are not system calls? |
| A. | chmod |
| B. | open |
| C. | lseek |
| D. | getc |
| Answer» E. | |
| 48. |
Which command will be used with vi editor to move back to the beginning of a word? |
| A. | b |
| B. | e |
| C. | a |
| D. | w |
| Answer» B. e | |
| 49. |
Which set option is used with vi editor to display line numbers on screen? |
| A. | nm |
| B. | nu |
| C. | ic |
| D. | li |
| Answer» C. ic | |
| 50. |
In a system ,if 5 people are currently using vi editor ,then the number of corresponding processes will be |
| A. | 1 |
| B. | 5 |
| C. | 3 |
| Answer» C. 3 | |