Unix - Study Mode

[#461] Which command is used to extract specific columns from the file?
Correct Answer

(B) cut

Explanation

Solution: In Unix, the cut command is used to extract specific columns from a file. It allows you to specify which columns you want to extract based on delimiters like space or tab. So, cut is the correct command to extract specific columns from a file.

[#462] Which command sends the word count of the file infile to the newfile.
Correct Answer

(A) wc infile >newfile

Explanation

Solution: In Unix, the wc command is used to count words, lines, and characters in a file. The > symbol is used for output redirection, which means that the output of the command preceding it will be written to the specified file. So, wc infile > newfile is the correct command to send the word count of the file infile to the newfile .

[#463] Which command is used to remove the read permission of the file 'note' from both the group and others?
Correct Answer

(D) chmod go-r note

Explanation

Solution: In Unix, the chmod command is used to change the permissions of a file. Here, go-r specifies that read permission should be removed for both the group (g) and others (o) . So, chmod go-r note is the correct command to remove the read permission of the file 'note' from both the group and others.

[#464] Which command is used as an alternative to echo command?
Correct Answer

(B) printf

[#465] Which command is used for locating files?
Correct Answer

(B) find