This section contains Aptitude Questions and Answers on Linux Shell Commands.
本节包含有关Linux Shell命令的 Aptitude问答。
- cmdtype 
- type 
- ctype 
- commandtype 
Correct answer: 2
type
The type command is used to check a Linux command is a built-in shell command or external command.
- 命令类型 
- 类型 
- 类型 
- 命令类型 
 正确答案:2 
 类型 
type命令用于检查Linux命令是内置的shell命令还是外部命令。
- pwd 
- cd 
- export 
- echo 
Options:
- A and B 
- C and D 
- A, B, and C 
- A, B, C, and D 
Correct answer: 4
A, B, C, and D
All given commands are built-in shell commands.
- 密码 
- 光盘 
- 出口 
- 回声 
选项:
- A和B 
- C和D 
- A,B和C 
- A,B,C和D 
 正确答案:4 
 A,B,C和D 
所有给定的命令都是内置的shell命令。
- cat 
- file 
- help 
- man 
Options:
- A and B 
- C and D 
- A, B, and D 
- A, B, C, and D 
Correct answer: 3
A, B, and D
The cat, file, and man are external commands used in the Linux operating system.
- 猫 
- 文件 
- 救命 
- 男子 
选项:
- A和B 
- C和D 
- A,B和D 
- A,B,C和D 
 正确答案:3 
 A,B和D 
cat , file和man是Linux操作系统中使用的外部命令。
- pcmd 
- which 
- pathcmd 
- None of the above 
Correct answer: 2
which
The which command is used to display the path of a command in the Linux File System.
- pcmd 
- 哪一个 
- 路径 
- 以上都不是 
 正确答案:2 
 哪一个 
which命令用于显示Linux文件系统中命令的路径。
- newcmd 
- new 
- alias 
- aliasname 
Correct answer: 3
alias
The alias command is used to assign a new name to the Linux built commands?
- 新命令 
- 新 
- 别名 
- 别名 
 正确答案:3 
 别名 
alias命令用于为Linux内置命令分配新名称?
- shell +x 
- shell -x 
- set -x 
- set + 
Correct answer: 3
set -x
The set –x command is used to enable the shell expansion.
- 壳+ x 
- 壳-x 
- 设置-x 
- 设置+ 
 正确答案:3 
 设置-x 
set –x命令用于启用外壳扩展。
- ; 
- % 
- && 
- || 
Correct answer: 1
;
The semicolon (;) operator is used to executing multiple commands in a single line.
- ; 
- % 
- && 
- || 
 正确答案:1 
 ; 
分号(;)运算符用于在一行中执行多个命令。
- rmalias 
- unalias 
- delalias 
- ralials 
Correct answer: 2
unalias
The unalias command is used to remove an existing alias.
- rmalias 
- 无别名 
- 德拉利亚斯 
- 集会 
 正确答案:2 
 无别名 
unalias命令用于删除现有别名。
- // 
- \\ 
- /**/ 
- # 
Correct answer: 4
#
The # operator is used to comment line in a shell script file.
- // 
- \\ 
- / ** / 
- # 
 正确答案:4 
 # 
#运算符用于注释shell脚本文件中的行。
- Yes 
- No 
Correct answer: 2
No
No, the alias created by the alias command can be used after exiting from shell. We can create permanent alias by storing alias in the bash startup file.
- 是 
- 没有 
 正确答案:2 
 没有 
不,从shell退出后,可以使用由alias命令创建的别名 。 我们可以通过将别名存储在bash启动文件中来创建永久别名。
- $? 
- %$ 
- ?& 
- [email protected] 
Correct answer: 1
$?
The dollar question mark ($?) is used to store the exit code of a previous command.
- $? 
- %$ 
- ?& 
- [电子邮件保护] 
 正确答案:1 
 $? 
美元问号( $? )用于存储上一个命令的退出代码。
- The Globbing is used to recognize the wildcard characters and then expand them into path-name. 
- The Globbing is also known as path-name expansion. 
- The File Globbing is not supported by the Linux operating system. 
- All the above 
Options:
- A and B 
- A and C 
- A, B, and C 
- D 
Correct answer: 1
A and B
Statements A and B are correct about GLobbing in the Linux operating system.
- Globbing用于识别通配符,然后将其扩展为路径名。 
- Globbing也称为路径名扩展。 
- Linux操作系统不支持File Globbing。 
- 以上全部 
选项:
- A和B 
- A和C 
- A,B和C 
- d 
 正确答案:1 
 A和B 
语句A和B关于Linux操作系统中的GLobbing是正确的。
- Wildcards are the string patterns that contain some special characters. 
- Wildcards are used to perform actions on one or more file that uses the same pattern. 
- Linux shell used wildcard characters for globbing. 
- All the above 
Options:
- A and B 
- A and C 
- A, B, and C 
- D 
Correct answer: 4
D
All given statements are correct about Wildcards in the Linux operating system.
- 通配符是包含一些特殊字符的字符串模式。 
- 通配符用于对使用相同模式的一个或多个文件执行操作。 
- Linux shell使用通配符来进行通配。 
- 以上全部 
选项:
- A和B 
- A和C 
- A,B和C 
- d 
 正确答案:4 
 d 
所有给定的语句对于Linux操作系统中的通配符都是正确的。
- ? 
- * 
- [] 
- <> 
Options:
- A and B 
- A and C 
- A, B, and C 
- D 
Correct answer: 3
A, B, and C
In the Linux, Question mark ?, asterisk *, and square brackets [] are used as wildcard characters.
- ? 
- * 
- [] 
- <> 
选项:
- A和B 
- A和C 
- A,B和C 
- d 
 正确答案:3 
 A,B和C 
在Linux中,问号? ,星号*和方括号[]用作通配符。
- lastcmd 
- last 
- history 
- chistory 
Correct answer: 3
history
The history command is used to display the last executed commands list.
- lastcmd 
- 持续 
- 历史 
- 情欲 
 正确答案:3 
 历史 
历史命令用于显示最后执行的命令列表。
- $HISTSIZE 
- $HISSIZE 
- $HISTORYSIZE 
- $HSIZE 
Correct answer: 1
$HISTSIZE
The $HISTSIZE environment variable is used to specify the number of commands history in the current environment. It can also modify according to our requirements.
- $ HISTSIZE 
- $ HISSIZE 
- $ HISTORYSIZE 
- $ HSIZE 
 正确答案:1 
 $ HISTSIZE 
$ HISTSIZE环境变量用于指定当前环境中的命令历史记录数。 也可以根据我们的要求进行修改。
- ## 
- $$ 
- !! 
- @@ 
Correct answer: 3
!!
The double exclamation (!!) is known as "bang bang" in the Linux operating system.
- ## 
- $$ 
- !! 
- @@ 
 正确答案:3 
 !! 
双重感叹号( !! )在Linux操作系统中被称为“ bang bang”。
- The "bang bang" command is used to remove commands history. 
- The "bang bang" command is used to remove execute last executed command. 
- The "bang bang" command is used to display the last login time of the current user. 
- None of the above 
Correct answer: 2
The "bang bang" command is used to remove execute last executed command.
The "bang bang" command is used to remove execute last executed command.
- “ bang bang”命令用于删除命令历史记录。 
- “ bang bang”命令用于删除执行最后执行的命令。 
- “ bang bang”命令用于显示当前用户的最后登录时间。 
- 以上都不是 
 正确答案:2 
 “ bang bang”命令用于删除执行最后执行的命令。 
“ bang bang”命令用于删除执行最后执行的命令。
- !N 
- #N 
- $N 
- !!N 
Correct answer: 1
!N
The single exclamation is used with history numbers to execute the specific command from history.
- !N 
- #N 
- $ N 
- !! N 
 正确答案:1 
 !N 
单个感叹号与历史记录编号一起使用以执行历史记录中的特定命令。
- Yes 
- No 
Correct answer: 1
Yes
Yes, we can embed the new shell on the command line.
- 是 
- 没有 
 正确答案:1 
 是 
是的,我们可以在命令行中嵌入新的shell。
翻译自: https://www.includehelp.com/linux/shell-commands-aptitude-questions-and-answers.aspx