溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

linux中如何使用type查看命令

發(fā)布時(shí)間:2021-10-26 14:01:06 來(lái)源:億速云 閱讀:185 作者:小新 欄目:云計(jì)算

這篇文章主要為大家展示了“l(fā)inux中如何使用type查看命令”,內(nèi)容簡(jiǎn)而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓小編帶領(lǐng)大家一起研究并學(xué)習(xí)一下“l(fā)inux中如何使用type查看命令”這篇文章吧。

type 查看命令類型,例如該命令是alias,還是內(nèi)置命令,還是某個(gè)文件,還是關(guān)鍵字

哪種神仙:天上還是地上,還是水里游的

[root@tianyun ~]# type ll

ll is aliased to `ls -l --color=auto'

[root@tianyun ~]# type ls

ls is aliased to `ls --color=auto'

[root@tianyun ~]# type cd

cd is a shell builtin //builtin內(nèi)置命令

[root@tianyun ~]# type for

for is a shell keyword //keyword關(guān)鍵字

[root@tianyun ~]# type useradd

useradd is /usr/sbin/useradd

[root@tianyun ~]# type -a ls //-a列出該命令所有類型

ls is aliased to `ls --color=auto'

ls is /usr/bin/ls

file 查看文件類型,例如文本文件,二進(jìn)制文件,管道文件,設(shè)備文件,鏈接文件

人,神,魔,妖

[root@tianyun ~]# file /etc/hostname

/etc/hostname: ASCII text

[root@tianyun ~]# file /dev/sda

/dev/sda: block special

[root@tianyun ~]# file /dev/zero

/dev/zero: character special

stat 文件的詳細(xì)屬性,例如文件的名稱,大小,權(quán)限,atime,ctime,mtime

人身高,體重,性別,年齡,道行

[root@tianyun ~]# stat /etc/hostname

File: '/etc/hostname'

Size: 22 Blocks: 8 IO Block: 4096 regular file

Device: fd00h/64768d Inode: 68703440 Links: 1

Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)

Access: 2017-07-25 11:11:14.257652134 +0800

Modify: 2017-07-25 10:21:34.175003119 +0800

Change: 2017-07-25 10:21:34.176003171 +0800

以上是“l(fā)inux中如何使用type查看命令”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道!

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI