顯示文件詳細信息:ls -l <file name>
determine file typelinux命令linux命令:file <file name>
output MIME type strings (--mime-type and --mime-encoding) :file -i <file name>
顯示文件狀態(tài)信息:stat <file name>
顯示文件在系統(tǒng)的狀態(tài)信息:stat -f <file name>
簡明顯示文件的狀態(tài)信息:stat -t <file name>
[anliven@CentOS7 ~]$ ls -l /usr/bin/bash
-rwxr-xr-x. 1 root root 960392 Aug 3 2016 /usr/bin/bash
[anliven@CentOS7 ~]$
[anliven@CentOS7 ~]$ file /usr/bin/bash
/usr/bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=b3078871b93598006980c166e4cd885b60a4f6af, stripped
[anliven@CentOS7 ~]$
[anliven@CentOS7 ~]$ file -i /usr/bin/bash
/usr/bin/bash: application/x-executable; charset=binary
[anliven@CentOS7 ~]$
[anliven@CentOS7 ~]$ stat /usr/bin/bash
File: ‘/usr/bin/bash’
Size: 960392 Blocks: 1880 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 5446 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2017-12-01 23:00:01.150409830 +0800
Modify: 2016-08-03 00:00:07.000000000 +0800
Change: 2017-04-23 08:08:44.204147902 +0800
Birth: -
[anliven@CentOS7 ~]$
[anliven@CentOS7 ~]$ stat -f /usr/bin/bash
File: "/usr/bin/bash"
ID: fd0000000000 Namelen: 255 Type: xfs
Block size: 4096 Fundamental block size: 4096
Blocks: Total: 9330226 Free: 8128895 Available: 8128895
Inodes: Total: 18669568 Free: 18540126
[anliven@CentOS7 ~]$
[anliven@CentOS7 ~]$ stat -t /usr/bin/bash
/usr/bin/bash 960392 1880 81ed 0 0 fd00 5446 1 0 0 1512140401 1470153607 1492906124 0 4096
[anliven@CentOS7 ~]$
posted @ 2017-12-01 23:11Anliven 閱讀(...) 評論(...) 編輯
上一個教程:nityuyukun
下一個教程:find 命令參數(shù)大全