linux过滤器命令_Linux过滤器命令能力问题和解答

linux过滤器命令

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

本节包含有关Linux筛选器命令的 Aptitude问题和解答。

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

Answer & Explanation

Correct answer: 3
A and B

Statements A and B are correct about piping in the Linux operating system.

1)下面给出了以下关于Linux操作系统管道中正确的语句:
  1. 将用于将一个命令的输出重定向到另一命令作为输入的过程进行管道传输。

  2. 我们使用管道(|)运算符执行管道。

  3. Linux不支持管道。 它仅在UNIX操作系统中有效。

  4. 以上都不是

选项:

  1. 只有一个

  2. 只有B

  3. A和B

  4. A和C

答案与解释

正确答案:3
A和B

关于Linux操作系统中的管道,语句A和B是正确的。

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

Answer & Explanation

Correct answer: 3
A and B

Statements A and B are correct about the cut command.

2)下面给出了以下关于cut命令的正确说法?
  1. cut命令用于选择文件的特定列。

  2. 我们可以在cut命令中使用定界符来分隔文件的列。

  3. 我们不能在cut命令中使用定界符。

  4. cut命令用于将文件从一个位置移动到另一位置。

选项:

  1. 只有一个

  2. 只有B

  3. A和B

  4. A和C

答案与解释

正确答案:3
A和B

语句A和B关于cut命令是正确的。

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

Answer & Explanation

Correct answer: 4
D

A delimiter can be a hyphen, space, and slash.

3)在cut命令中,定界符可以是?
  1. 连字号

  2. 空间

  3. 削减

  4. 上述所有的

选项:

  1. 一个

  2. C

  3. d

答案与解释

正确答案: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

Answer & Explanation

Correct answer: 2
-d

The "-d" option is used to mention delimiter in the cut command.

4)以下哪个选项在cut命令中用于提及定界符?
  1. -德尔

  2. -d

  3. -德米特

  4. -delm

答案与解释

正确答案:2
-d

“ -d”选项用于在cut命令中提及定界符。

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

Answer & Explanation

Correct answer: 4
A and C

Statements A and C are correct about grep command.

5)关于grep命令,以下哪些陈述是正确的?
  1. 此命令用于过滤文件的内容。

  2. 该命令不用于过滤文件内容。

  3. 我们可以使用grep命令在文件中搜索指定的单词。

  4. Linux操作系统中没有grep命令。

选项:

  1. 只有一个

  2. 只有一个

  3. A和B

  4. A和C

答案与解释

正确答案:4
A和C

语句A和C关于grep命令是正确的。

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

Answer & Explanation

Correct answer: 1
Global Regular Expression Print

The "grep" stands for "Global Regular Expression Print".

6)grep代表什么?
  1. 全局正则表达式打印

  2. 一般正则表达式挂钩

  3. 一般正则表达式帖子

  4. 全球正则表达式发布

答案与解释

正确答案:1
全局正则表达式打印

“ grep”代表“全局正则表达式打印”。

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>

Answer & Explanation

Correct answer: 1
grep -v <specific word> <filename>

The 1st statement is correct command to print lines of the file that are not matching to the specific word.

7)使用哪个确切命令来打印文件中与特定单词不匹配的行?
  1. grep -v <特定字词> <文件名>

  2. grep -i <特定字词> <文件名>

  3. grep -k <特定字词> <文件名>

  4. grep -n <特定字词> <文件名>

答案与解释

正确答案:1
grep -v <特定字词> <文件名>

第一条语句是正确的命令,用于打印与特定单词不匹配的文件行。

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

Answer & Explanation

Correct answer: 2
-i

The "-i" option is used to ignore the case for searching a word in a file.

8)在grep命令中使用以下哪个选项来通过忽略大小写从文件中搜索特定单词?
  1. -一个

  2. -一世

  3. -C

  4. -ing

答案与解释

正确答案:2
-一世

“ -i”选项用于忽略在文件中搜索单词的情况。

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

Answer & Explanation

Correct answer: 3
A and B

Statements A and B are correct about comm command in the Linux operating system.

9)关于XXXcomm命令,以下哪些陈述是正确的?
  1. comm命令用于比较两个文件的数据。

  2. 默认情况下,它在输出中显示三列。

  3. 默认情况下,它在输出中显示两列。

  4. comm命令用于与TCP套接字通信。

选项:

  1. 一个

  2. A和B

  3. C和D

答案与解释

正确答案:3
A和B

语句A和B关于Linux操作系统中的comm命令是正确的。

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

Answer & Explanation

Correct answer: 3
comm -12 <file1> <file2>

The 3rd option is correct, because -12 describes, it do not display 1st and 2nd column.

10)使用哪个确切命令仅显示两个文件的匹配数据?
  1. 通讯-13 <file1> <file2>

  2. 通讯-23 <file1> <file2>

  3. 通讯-12 <file1> <file2>

  4. 以上都不是

答案与解释

正确答案:3
通讯-12 <file1> <file2>

第三个选项是正确的,因为-12描述,所以它不显示第一列和第二列。

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

Answer & Explanation

Correct answer: 1
A and C

Statements A and C are correct about sed command in the Linux operating system.

11)关于XXXsed命令,以下哪些陈述是正确的?
  1. sed命令用于在控制台屏幕上显示修改后的数据,文件中的实际数据保持不变。

  2. sed命令用于永久修改文件数据。

  3. 正则表达式用于在sed命令中显示文件的修改数据。

  4. sed命令不使用正则表达式。

选项:

  1. A和C

  2. A和D

  3. B和C

  4. B和D

答案与解释

正确答案:1
A和C

语句A和C在Linux操作系统中关于sed命令是正确的。

12) In Linux, the sed stands for?
  1. String Editor

  2. Stream Editor

  3. Simple Editor

  4. Single Editor

Answer & Explanation

Correct answer: 2
Stream Editor

The "sed" stands for Stream Editor in the Linux Operating System.

12)在Linux中,sed代表什么?
  1. 字符串编辑器

  2. 流编辑器

  3. 简单编辑器

  4. 单一编辑器

答案与解释

正确答案:2
流编辑器

“ sed”代表Linux操作系统中的Stream 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

Answer & Explanation

Correct answer: 1
d

Option "d" is used in the regular expression to remove a complete line from the output of a file using sed command.

13)在正则表达式中使用哪个选项使用“ sed”命令从文件输出中删除整行?
  1. cat猫

  2. 兹莫尔

  3. Zless

  4. 吉普

选项:

  1. d

  2. 德尔

  3. 删除

  4. 雷姆

答案与解释

正确答案:1
d

在正则表达式中使用选项“ d”,使用sed命令从文件输出中删除整行。

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

Answer & Explanation

Correct answer: 4
tee

The tee command is the correct answer.

14)使用哪个命令从标准输入设备读取数据并写入标准输出和一个或多个文件?
  1. ei

  2. 领带

  3. 三通

答案与解释

正确答案:4
三通

tee命令是正确的答案。

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

  2. No

Answer & Explanation

Correct answer: 1
Yes

Yes, we can do this using the "tr" command.

15)我们可以显示所有'\ n'(换行符)都被空格替换的文件的输出吗?
  1. 没有

答案与解释

正确答案:1

是的,我们可以使用“ tr”命令执行此操作。

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

Answer & Explanation

Correct answer: 1
Yes

Yes, we can do this using the "tr" command.

16)确实可以显示文件的输出,使用“ tr”命令将所有小的指定字符集都替换为大写字母,反之亦然吗?
  1. 没有

答案与解释

正确答案:1

是的,我们可以使用“ tr”命令执行此操作。

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

Answer & Explanation

Correct answer: 3
B and C

Statements B and C are correct about uniq command.

17)关于XXXuniq命令,以下哪个语句是正确的?
  1. 此命令用于从文件中永久删除唯一数据。

  2. 此命令用于显示排序列表,其中每个单词只会出现一次。

  3. 我们可以使用uniq命令来计算单词的出现。

  4. 以上都不是

选项:

  1. A和B

  2. A和C

  3. B和C

  4. B和D

答案与解释

正确答案:3
B和C

语句B和C关于uniq命令是正确的。

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

Answer & Explanation

Correct answer: 4
D

All statements are correct about "wc" command.

18)以下哪项关于XXXwc命令正确?
  1. 此命令用于计算文件的行数。

  2. 此命令用于计算文件的字数。

  3. 此命令用于计算文件的字符。

  4. 以上全部。

选项:

  1. A和B

  2. A和C

  3. B和C

  4. d

答案与解释

正确答案:4
d

所有有关“ wc”命令的陈述都是正确的。

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

Answer & Explanation

Correct answer: 4
D

All statements are correct about od command.

19)关于XXXod命令,以下哪些陈述是正确的?
  1. 此命令用于以八进制格式显示文件的内容。

  2. 此命令用于以十六进制格式显示文件的内容。

  3. 此命令用于以ASCII格式显示文件的内容。

  4. 以上全部。

选项:

  1. A和B

  2. A和C

  3. B和C

  4. d

答案与解释

正确答案:4
d

所有关于od命令的陈述都是正确的。

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

Answer & Explanation

Correct answer: 3
A, B, and C

Statements A, B, and C are correct about sort command.

20)关于XXXsort命令,以下哪些陈述是正确的?
  1. 此命令用于按字母顺序对文件的内容进行排序。

  2. 此命令用于根据列对文件内容进行排序。

  3. 此命令用于基于列的数字排序。

  4. 以上都不是。

选项:

  1. A和B

  2. A和C

  3. A,B和C

  4. d

答案与解释

正确答案:3
A,B和C

语句A,B和C关于sort命令是正确的。

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

Answer & Explanation

Correct answer: 2
-k

The option "-k" is used to specify the column number for sorting the content of a file.

21)如果我们要基于特定的列号对文件内容进行排序,则在sort命令中使用哪个选项?
  1. -C

  2. -k

  3. -n

  4. -F

答案与解释

正确答案:2
-k

选项“ -k”用于指定用于对文件内容进行排序的列号。

22) Which command is used to compress a file?
  1. zip

  2. gzip

  3. ezip

  4. mzip

Answer & Explanation

Correct answer: 2
gzip

The "gzip" command is used to compress a file.

22)哪个命令用于压缩文件?
  1. 压缩

  2. gzip

  3. 压缩

  4. 压缩文件

答案与解释

正确答案:2
gzip

“ gzip”命令用于压缩文件。

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

Answer & Explanation

Correct answer: 3
Using -l option of gzip command

The option "-l" of "gzip" command is used to see the compression ratio of a file.

23)我们如何查看文件的压缩率?
  1. 使用gzip命令的-c选项

  2. 使用gzip命令的-r选项

  3. 使用gzip命令的-l选项

  4. 使用gzip命令的-cr选项

答案与解释

正确答案:3
使用gzip命令的-l选项

“ gzip”命令的选项“ -l”用于查看文件的压缩率。

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

  2. No

Answer & Explanation

Correct answer: 2
No

No, we cannot compress a directory using gzip command.

24)我们可以使用gzip命令压缩目录吗?
  1. 没有

答案与解释

正确答案:2
没有

不可以,我们无法使用gzip命令压缩目录。

25) Which of the following command is used to compress a directory?
  1. gzip

  2. dzip

  3. tar

  4. rat

Answer & Explanation

Correct answer: 3
tar

The "tar" command is used to compress a directory.

25)以下哪个命令用于压缩目录?
  1. gzip

  2. dzip

  3. 柏油

答案与解释

正确答案:3
柏油

“ tar”命令用于压缩目录。

翻译自: https://www.includehelp.com/linux/filter-commands-aptitude-questions-and-answers.aspx

linux过滤器命令

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值