Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the use of the stat command in Linux

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you what is the use of the stat command in Linux, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

The Linux common command stat command is used to display the status information of the file. The output of the stat command is more detailed than the output of the ls command.

Stat is used to display the status information of a file

Syntax stat (options) (parameters) option-L: support symbolic links;-f: display file system status rather than file status;-t: output information in a concise way;-- help: display instruction help information;-- version: display instruction version information. Parameter file: specify the normal file or the device file name corresponding to the file system to display the information.

Example [root@localhost ~] # ls-l myfile-rw-r--r-- 1 root root 0 2010-10-09 myfile [root@localhost ~] # stat myfile file: "myfile" Size: 0 Blocks: 8 IO Block: 4096 General empty file Device: fd00h/64768d Inode: 194805815 Links: 1 Access: (0644) Uid: (0 / root) Gid : (0 / root) Access: 2010-12-12 12 Modify 2222 type 35.000000000 + 0800 Modify: 2010-10-09 20 purl 4415 21.000000000 + 0800 Change: 2010-10-09 20 20 Change: 21.000000000 + 0800 [root@localhost] # stat-f myfile File: "myfile" id: 0 Namelen: 255 type: ext2/ext3 Block size: 4096 Fundamental block size: 4096 Blocks: Total: 241555461 free: 232910771 Available: 220442547 Inodes: Total: 249364480 Free: 249139691 [root@localhost ~] # stat-t myfile myfile 0 8 81a4 00 fd00 194805815 1 00 1292127755 1286628261 1286628261 4096 and above are all the contents of the article "what is the use of stat commands in Linux" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report