Linux Filter Commands Aptitude Questions and Answers

Linux Filter Commands Aptitude Questions and Answers: This section contains aptitude questions and answers on Linux Filter Commands.
Submitted by Nidhi, on May 04, 2020

This section contains Aptitude Questions and Answers on Linux Filter Commands.

1) There are the following statements that are given below which of them are correct about piping in the Linux operating system?
  1. The piping the process which is used to redirect the output of one command to another command as an input.
  2. We use the pipe (|) operator to perform piping.
  3. The piping is not supported in Linux; it works only in the UNIX operating system.
  4. None of the above

Options:

  1. Only A
  2. Only B
  3. A and B
  4. A and C

2) There are the following statements that are given below which of them are correct about cut command?
  1. The cut command is used to select a specific column of a file.
  2. We can use a delimiter in the cut command to separate the columns of a file.
  3. We cannot use a delimiter in the cut command.
  4. The cut command is used to move files from one location to another location.

Options:

  1. Only A
  2. Only B
  3. A and B
  4. A and C

3) In the cut command, a delimiter can be?
  1. Hyphen
  2. Space
  3. Slash
  4. All of the above

Options:

  1. A
  2. B
  3. C
  4. D

4) Which of the following option is used to mention delimiter in the cut command?
  1. -del
  2. -d
  3. -delmiter
  4. -delm

5) Which of the following statements are the correct about grep command?
  1. This command is used to filter the content of the file.
  2. This command is not used to filter the content of the file.
  3. We can search the specified word in the file using grep command.
  4. There is no grep command that exists in the Linux operating system.

Options:

  1. Only A
  2. Only A
  3. A and B
  4. A and C

6) The grep stands for?
  1. Global Regular Expression Print
  2. General Regular Expression Pegging
  3. General Regular Expression Post
  4. Global Regular Expression Post

7) Which exact command is used to print lines of the file that are not matching to the specific word?
  1. grep -v <specific word> <filename>
  2. grep -i <specific word> <filename>
  3. grep -k <specific word> <filename>
  4. grep -n <specific word> <filename>

8) Which of the following option is used in grep command to search specific words from a file by ignoring case?
  1. -a
  2. -i
  3. -c
  4. -ing

9) Which of the following statements are the correct about XXXcomm command?
  1. The comm command is used to compare the data of two files.
  2. It displays three columns in the output by default.
  3. It displays two columns in the output by default.
  4. The comm command is used to communicate with the TCP socket.

Options:

  1. A
  2. B
  3. A and B
  4. C and D

10) Which exact command is used to display only matched data of two files?
  1. comm -13 <file1> <file2>
  2. comm -23 <file1> <file2>
  3. comm -12 <file1> <file2>
  4. None of the above

11) Which of the following statements are the correct about XXXsed command?
  1. The sed command is used to display modified data on the console screen, actual data in the file remain the same.
  2. The sed command is used to modify the data of a file permanently.
  3. The regular expressions are used to display modified data of a file in the sed command.
  4. The sed command does not use regular expressions.

Options:

  1. A and C
  2. A and D
  3. B and C
  4. B and D

12) In Linux, the sed stands for?
  1. String Editor
  2. Stream Editor
  3. Simple Editor
  4. Single Editor

13) Which option is used in the regular expression to remove a complete line from the output of a file using "sed" command?
  1. zcat
  2. zmore
  3. zless
  4. zgip

Options:

  1. d
  2. del
  3. delete
  4. rem

14) Which command is used to read data from the standard input device and write to the standard output and one or more files?
  1. tea
  2. tei
  3. tie
  4. tee

15) Can we display the output of a file where all '\n' (newline) character are replaced by space?
  1. Yes
  2. No

16) Is it true that we can display the output of a file, where all small specified sets of characters are replaced by capital characters or vice versa using the "tr" command?
  1. Yes
  2. No

17) Which of the following statements are the correct about XXXuniq command?
  1. This command is used to delete unique data from a file permanently.
  2. This command is used to display a sorted list in which every word will occur only once.
  3. We can count the occurrence of a word using uniq command.
  4. None of the above

Options:

  1. A and B
  2. A and C
  3. B and C
  4. B and D

18) Which of the following statements are the correct about XXXwc command?
  1. This command is used to count the lines of a file.
  2. This command is used to count the words of a file.
  3. This command is used to count the characters of a file.
  4. All the above.

Options:

  1. A and B
  2. A and C
  3. B and C
  4. D

19) Which of the following statements are the correct about XXXod command?
  1. This command is used to display the content of the file in octal format.
  2. This command is used to display the content of the file in hexadecimal format.
  3. This command is used to display the content of the file in ASCII format.
  4. All the above.

Options:

  1. A and B
  2. A and C
  3. B and C
  4. D

20) Which of the following statements are the correct about XXXsort command?
  1. This command is used to sort the content of a file in alphabetical order.
  2. This command is used to sort the content of a file based on the column.
  3. This command is used for numeric sorting bases on the column.
  4. None of the Above.

Options:

  1. A and B
  2. A and C
  3. A, B, and C
  4. D

21) Which option is used in sort command, if we want to sort the content of the file based on a specific column number?
  1. -c
  2. -k
  3. -n
  4. -f

22) Which command is used to compress a file?
  1. zip
  2. gzip
  3. ezip
  4. mzip

23) How can we see the compression ratio of a file?
  1. Using -c option of gzip command
  2. Using -r option of gzip command
  3. Using -l option of gzip command
  4. Using -cr option of gzip command

24) Can we compress a directory using gzip command?
  1. Yes
  2. No

25) Which of the following command is used to compress a directory?
  1. gzip
  2. dzip
  3. tar
  4. rat





Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.