How to use type to view commands in linux
This article mainly shows you how to use the type view command in linux. The content is simple and easy to understand. It is clearly organized. I hope it can help you solve your doubts. Let Xiaobian lead you to study and learn how to use the type view command in linux.
type Check the type of command, such as whether the command is alias, built-in command, file, or keyword
What kind of gods: heaven or earth, or swimming in water
[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 built-in command
[root@tianyun ~]# type for
for is a shell keyword //keyword Keyword
[root@tianyun ~]# type useradd
useradd is /usr/sbin/useradd
[root@tianyun ~]# type -a ls //-a List all types of this command
ls is aliased to `ls --color=auto'
ls is /usr/bin/ls
file View file types such as text files, binary files, pipeline files, equipment files, link files
Man, God, Devil, Demon
[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 Detailed attributes of the file, such as file name, size, permissions, atime, ctime, mtime
height, weight, sex, age, and skill
[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
The above is "how to use the type view command in linux" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!