linux stat 设备号,每天一个Linux 命令 - stat

stat

stat file/dir

功能 : 显示inode内容

Colors 文件的详细信息

Colors 文件的详细信息

cc@MyLinux:~$ stat Colors

File: 'Colors'

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

Device: 801h/2049d Inode: 289123 Links: 1

Access: (0664/-rw-rw-r--) Uid: ( 1000/ cc) Gid: ( 1000/ cc)

Access: 2017-03-04 21:28:57.807863187 -0800

Modify: 2017-03-04 21:28:57.807863187 -0800

Change: 2017-03-04 21:28:57.863865729 -0800

Birth: -

File: 文件名

size: 文件大小

Blocks: 文件所占用Block的块数

IO Block: 文件IO Block的大小

regular file: 文件的类型

Device: 设备号 以八进制和十进制显示

Inode: inode号

Links: 硬链接数量

Access : 访问权限

Uid : 拥有者ID userid

Gid : 所在的组的ID

Access: 最后访问时间

Modify: 文件内容最后修改时间

-Change: 文件属性最后修改时间

注:

Access,Modify ,Change 三者的区别

虚拟文件系统and软连接硬链接

Details of Linux Stat Command Output

File: – Absolute path name of the file.

Size: – File size in bytes.

Blocks: – Total number of blocks used by this file.

IO Block: – IO block size for this file.

regular file – Indicates the file type. This indicates that this is a - regular file.

Following are available file types.

regular file. ( ex: all normal files ).

directory. ( ex: directories ).

socket. ( ex: sockets ).

symbolic link. ( ex: symbolic links. )

block special file ( ex: hard disk ).

character special file. ( ex: terminal device file ).

Device: – Device number in hex and device number in decimal

Inode: – Inode number is a unique number for each file which is used for the internal maintenance by the file system.

Links: 1 – Number of links to the file

Access: (0600/-rw——-): Access specifier displayed in both octal and character format. Let us see explanation about both the format.

Uid: ( 1000/ sathiya) – File owner’s user id and user name are displayed.

Gid: ( 1000/ sathiya) – File owner’s group id and group name are displayed.

Access: 2009-06-28 19:29:57.000000000 +0530 – Last access time of the file.

Modify: 2009-06-28 19:29:57.000000000 +0530 – Last modification time of the file.

Change: 2009-06-28 19:29:57.000000000 +0530 – Last change time of the inode data of that file.

stat -f file/dir

stat -f filename

显示关于文件系统的信息,而非文件本身

cc@MyLinux:~$ stat -f 123.txt

File: "123.txt"

ID: c6f552ab700bb548 Namelen: 255 Type: ext2/ext3

Block size: 4096 Fundamental block size: 4096

Blocks: Total: 4869551 Free: 3475145 Available: 3222025

Inodes: Total: 1245184 Free: 1033487

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值