InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
What is the full form of grep? |
|
Answer» Globally search for regular expression. |
|
| 52. |
How can we execute a shell script if execute bit is off for a shell script? |
|
Answer» sh <file> |
|
| 53. |
Is it compulsory to have the extension ‘sh’ for a shell script? |
|
Answer» No, it is a convention. |
|
| 54. |
Which command can be used to throw/return a value from the function? |
|
Answer» return |
|
| 55. |
What is a here document? |
|
Answer» A here document is used to redirect input into an interactive shell script or program. |
|
| 56. |
How can we capture commands displayable output in a shell variable? |
|
Answer» Enclose the command in back quotes and assign it to a variable. |
|
| 57. |
Which switch can be used in test expression to determine a file as a regular file? |
|
Answer» −f |
|
| 58. |
Which command can be used to perform arithmetical computations? |
|
Answer» expr |
|
| 59. |
How can we get the execution status of the last executed command? |
|
Answer» $? |
|
| 60. |
What is the value returned by a command after its successful execution? |
|
Answer» 0 |
|
| 61. |
Which shell variable holds the shell script file name? |
|
Answer» $0 |
|
| 62. |
Which command can be used to delete a shell variable? |
|
Answer» unset. |
|
| 63. |
How can we retrieve the value of the shell variable? |
|
Answer» By prefixing the dollar ($) symbol for the shell variable. |
|
| 64. |
Which command can be used to alter the file access permissions? |
|
Answer» chmod |
|
| 65. |
What is a shebang line? |
|
Answer» A first line in the shell script which tells which shell need to be used to execute the following commands in the shell script. |
|
| 66. |
How can you display line numbers in vi editor? |
|
Answer» :set nu |
|
| 67. |
What is yanking w.r.t vi editor? |
|
Answer» Yanking is the process of holding the cut or copied text into the buffer which can pasted. |
|
| 68. |
Which alphabet keys can move the cursor equivalent to arrow keys? |
|
Answer» k, j, h and l |
|
| 69. |
How to open a file in read only mode using vi editor? |
|
Answer» vi − R |
|
| 70. |
What is a process? |
|
Answer» A running instance of a program is called as a process. |
|
| 71. |
Which command can be used to print a document on the line printer typically? |
|
Answer» lp/lpr |
|
| 72. |
Name the environment variable which can be used to change the primary shell prompt. |
|
Answer» PS1 |
|
| 73. |
What is the meaning of execute permission on a directory? |
|
Answer» Having an execute permission on a directory means to have traverse permission. |
|
| 74. |
What is difference between absolute and relative path? |
|
Answer» A pathname is absolute if it is described in relation to root, so absolute pathnames always begin with a /. A pathname if it is relative to your current working directory is called as relative path. Relative pathnames never begin with / |
|
| 75. |
What is the file descriptor which represents the STDIN. |
|
Answer» 0 |
|
| 76. |
What are the meta-characters which represent to match all and single chracters respectively? |
|
Answer» * And ? |
|
| 77. |
Which command can be used to know about the directory path of a command? |
|
Answer» which |
|
| 78. |
Which command can give the manual of a command? |
|
Answer» man |
|
| 79. |
What does the second column signifies in the output generated by 'who' command? |
|
Answer» The terminal associated with the respective login. |
|
| 80. |
At which company UNIX is designed first. |
|
Answer» AT & T Bell labs. |
|
| 81. |
Which programming language is used in the design of UNIX OS. |
|
Answer» C |
|
| 82. |
Who designed the UNIX operating system? |
|
Answer» Ken Thompson |
|
| 83. |
What is a hidden file? |
|
Answer» A file/directory name beginning with. (dot) is considered as hidden one. |
|
| 84. |
With the ls −l listing from first column output which nth character (out of 10) represents file type? |
|
Answer» First. |
|
| 85. |
Name 5 variants of linux? |
|
Answer» Redhat, Cent OS, Debian, Ubuntu and Fedora. |
|
| 86. |
Is UNIX open source? |
|
Answer» No, Linux is open source. |
|
| 87. |
Name a command which can be used to restart the machine? |
|
Answer» reboot. |
|
| 88. |
Is UNIX/Linux case sensitive from the console terminal end. |
|
Answer» Yes. |
|
| 89. |
Name a command which can be used to shut down the system? |
|
Answer» shutdown. |
|
| 90. |
What are the various ways that you can disconnect/logout with the UNIX server from your console terminal? |
|
Answer» Command − logout / ctrl+d / command − exit |
|
| 91. |
What is the second column designates in the long listing of ls command’s output? |
|
Answer» Link count. |
|
| 92. |
What is the name of the command to change the password? |
|
Answer» passwd. |
|
| 93. |
Which program is responsible to bring the login prompt? |
|
Answer» Login program. |
|
| 94. |
What is the role of kernel? |
|
Answer» It interacts with hardware and most of the tasks like memory management, tash scheduling and file management. |
|
| 95. |
What is Sun micro systems UNIX called as? |
|
Answer» Solaris. |
|
| 96. |
What is soft link/symbolic link and which command can be used to create one? |
|
Answer» It is a short cut to the file or directory. ln is the command used for the same. |
|
| 97. |
Name the commonly used shells on different UNIX/Linux variants. |
|
Answer» Bsh, csh, ksh and bash. |
|