美文网首页
linux 文件基本操作之文件属性查看

linux 文件基本操作之文件属性查看

作者: kangkang94 | 来源:发表于2019-03-05 01:05 被阅读0次
    • 文件属性的查看

      • stat 命令
      
          [root@MiWiFi-R3L-srv ~]# whatis stat
          stat (1)             - display file or file system status
      
          # 展示文件夹app的状态
          [root@MiWiFi-R3L-srv ~]# stat app
          文件:"app"
          大小:33         块:0          IO 块:4096   目录
          设备:fd00h/64768d   Inode:34080431    硬链接:3
          权限:(0755/drwxr-xr-x)  Uid:(    0/    root)   Gid:(    0/    root)
          环境:unconfined_u:object_r:admin_home_t:s0
          最近访问:2019-03-04 00:54:13.234782442 +0800
          最近更改:2019-03-04 00:54:12.170771128 +0800
          最近改动:2019-03-04 00:54:12.170771128 +0800
          创建时间:-
      
          # 展示文件系统的信息
          [root@MiWiFi-R3L-srv ~]# stat -f app
          文件:"app"
          ID:fd0000000000 文件名长度:255     类型:xfs
          块大小:4096       基本块大小:4096
          块:总计:13100800   空闲:12558356   可用:12558356
          Inodes: 总计:26214400   空闲:26137691
      
      
    • file 命令

      
        [root@MiWiFi-R3L-srv dirlab]# whatis file
        file (1)             - determine file type
        [root@MiWiFi-R3L-srv dirlab]# file sdst.txt
        sdst.txt: symbolic link to `dst.txt'
      
      
    • ls 命令

      
        [root@MiWiFi-R3L-srv dirlab]# whatis ls
        ls (1)               - list directory contents
        [root@MiWiFi-R3L-srv dirlab]# ls -lhai
        总用量 44K
        33572438 drwxr-xr-x. 2 root root  111 3月   3 22:34 .
        68128472 drwxr-xr-x. 3 root root   78 3月   3 21:09 ..
        34039069 -rw-r--r--. 1 root root   61 3月   3 21:39 a.txt
        33572440 -rw-r--r--. 2 root root 9.6K 3月   1 00:04 dst.txt
        34049124 -rw-r--r--. 1 root root   56 3月   3 22:16 less.txt
        33563386 -rw-r--r--. 1 root root 7.8K 3月   3 22:36 log.txt
        33572439 -rw-r--r--. 1 root root 9.9K 3月   3 21:21 ps.txt
        33572431 lrwxrwxrwx. 1 root root    7 3月   1 00:18 sdst.txt -> dst.txt
        34039051 -rw-r--r--. 1 root root   54 3月   3 21:32 test.txt
      
      

    相关文章

      网友评论

          本文标题:linux 文件基本操作之文件属性查看

          本文链接:https://www.haomeiwen.com/subject/brrcuqtx.html