environment:
- centos7.6
- ubuntu21.10
This command is used to display the attribute information of the file, such as: size, various times, permissions, etc.
Let’s take a brief look at the example first:
the file size, INode number, number of hard links, permissions, and time information are displayed above.
Note that there is 创建时间: -
a , so this display is because centos7.1 is an xfs file system, which does not support creation time. The creation time is newly added by the ext4 file system. If it is ubuntu21.10, it will be displayed as follows:
Here, by the way, explain the four common times:
- atime: the access time, which is updated when the file content is read.
- mtime: the modifycation time, which is updated when the content of the file is changed.
- ctime: Change time, which is updated when file attributes are changed, such as file permissions and other attributes.
- crtime: create time, file creation time (ext4 new)
Well, in fact, this command only needs to know these.
If you want to obtain batches, refer to: