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