ITPub博客

首页 > 云计算 > Openstack > 云计算学习资料分享:type查看命令

云计算学习资料分享:type查看命令

原创 Openstack 作者:千锋云计算 时间:2019-07-25 17:52:27 0 删除 编辑

type 查看命令类型,例如该命令是alias,还是内置命令,还是某个文件,还是关键字

哪种神仙:天上还是地上,还是水里游的

[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内置命令

[root@tianyun ~]# type for

for is a shell keyword //keyword关键字

[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 查看文件类型,例如文本文件,二进制文件,管道文件,设备文件,链接文件

人,神,魔,妖

[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 文件的详细属性,例如文件的名称,大小,权限,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


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69916964/viewspace-2651789/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-04-18

  • 博文量
    933
  • 访问量
    613402