In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
This article uses simple and easy to understand examples to introduce the role of stat command in Linux and how to use it. The content of the article is compact step by step. I hope you can gain something from this article.
1, stat command role:
The stat command displays detailed attribute information for a file or directory, including file system status, in more detail than the ls command outputs.
2. Common options:
option
Function-f Displays file system status, not file status. - tPrint information in concise form
3. Examples:
1) No options are added by default
[root@localhost ~]# lsanaconda-ks.cfg ip.txt number www[root@localhost ~]# stat www File: 'www' Size: 34 Blocks: 8 IO Block: 4096 regular fileDevice: fd00h/64768d Inode: 33618826 Links: 1Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)Context: unconfined_u:object_r:admin_home_t:s0Access: 2020-01-02 14:40:50.771405666 +0800Modify: 2019-12-17 23:49:37.367102234 +0800Change: 2019-12-17 23:49:37.367102234 +0800 Birth: -
Notes:
Access: the time the file was accessed;
Modify: the time at which the file was modified;
Change: The last time the i node (attribute information) of the file was modified. Note: When the file is modified, the information of the i node is also modified.
2)-f option, this option only looks at file system status.
[root@localhost ~]# stat -f www File: "www" ID: fd0000000000 Namelen: 255 Type: xfsBlock size: 4096 Fundamental block size: 4096Blocks: Total: 4452864 Free: 4140969 Available: 4140969Inodes: Total: 8910848 Free: 8877166
Notes:
Type: File system type
3)-t option, this option displays information in a concise manner
[root@localhost ~]# stat -t www www 34 8 81ed 0 0 fd00 33618826 1 0 0 1577947250 1576597777 1577954750 0 4096 unconfined_u:object_r:admin_home_t:s0
About the use of stat command in Linux to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.