stat命令–显示文件状态信息

stat命令用来显示文件或文件系统的详细信息

# 查看文件详细信息
stat test 
  File: ‘test’
  Size: 9         	Blocks: 8          IO Block: 4096   regular file
Device: fd00h/64768d	Inode: 16777282    Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-03-29 16:54:13.352998075 +0800
Modify: 2022-03-29 14:23:02.468693248 +0800
Change: 2022-03-29 16:53:59.437650907 +0800


# 以数字方式显示文件权限
stat -c %a test
755

最后更新于