Unix - Study Mode

[#386] Which of the following files will displayed by this command cat *ch*
Correct Answer

(D) All of the above

Explanation

Solution: In Unix, the command cat ch will display the contents of all files in the current directory that have "ch" in their filenames. Therefore, it will display the contents of files like patch , catch , and .ch . So, All of the above files will be displayed by the command cat ch .

[#387] The Octal number to be given alogn with chmod command to make a file readable, writable and executable to the owner, readable and executable to group and others is:
Correct Answer

(B) 755

Explanation

Solution: In Unix, file permissions are represented by three digits in octal form. Each digit corresponds to a set of permissions: the first digit for the owner, the second for the group, and the third for others. The permissions are represented by adding up the values for read (4), write (2), and execute (1). For the owner to have read, write, and execute permissions (7 = 4 + 2 + 1). For the group and others to have read and execute permissions (5 = 4 + 1). So, the octal number to be given along with the chmod command to achieve these permissions is 755 .

[#388] If you are to use [Control-c] as the interrupt key instead of [Del], then you will have to use
Correct Answer

(B) stty intr ^c

Explanation

Solution: In Unix, the stty command is used to change or display terminal settings. The intr option is used to specify the interrupt key, which is used to interrupt or terminate the current process. By default, the interrupt key is set to ^c , which represents Control-c . So, to use Control-c as the interrupt key, you would use the command stty intr ^c . Therefore, Option B: stty intr ^c is the correct command to set Control-c as the interrupt key.

[#389] Which of the following is not a communication command.
Correct Answer

(D) grep

Explanation

Solution: In Unix, grep is not a communication command. It is a powerful utility used for searching patterns in files. It stands for "global regular expression print". On the other hand, the other options are indeed communication commands: write : Used to send messages to another user logged in on the same system. mesg : Used to control whether other users can send messages to you. mail : Used to send and receive email messages. So, Option D: grep is not a communication command.

[#390] Which of the following keys is used to move the cursor to the end of the paragraph.
Correct Answer

}

Explanation

Solution: In Unix, to move the cursor to the end of the paragraph, the key used is G (capital G) in vi or Vim . Therefore, None of the above options correspond to the key used to move the cursor to the end of the paragraph.