{"id":151,"date":"2013-05-27T20:46:31","date_gmt":"2013-05-27T12:46:31","guid":{"rendered":"http:\/\/coderbee.net\/?p=151"},"modified":"2013-05-27T16:47:40","modified_gmt":"2013-05-27T08:47:40","slug":"stat-%e6%98%be%e7%a4%ba%e6%96%87%e4%bb%b6%e6%88%96%e6%96%87%e4%bb%b6%e7%b3%bb%e7%bb%9f%e7%8a%b6%e6%80%81","status":"publish","type":"post","link":"https:\/\/coderbee.net\/index.php\/linux\/20130527\/151","title":{"rendered":"stat \u663e\u793a\u6587\u4ef6\u6216\u6587\u4ef6\u7cfb\u7edf\u72b6\u6001"},"content":{"rendered":"<h2>stat<\/h2>\n<p>\u663e\u793a\u6587\u4ef6\u6216\u6587\u4ef6\u7cfb\u7edf\u7684\u72b6\u6001\u3002<\/p>\n<h3>\u4f7f\u7528\u5f62\u5f0f<\/h3>\n<p><code>stat  [option]...   file...<\/code><\/p>\n<h3>\u9009\u9879<\/h3>\n<ul>\n<li><code>-L,  --dereference<\/code>\uff1a\u89e3\u6790\u94fe\u63a5\u7b26\u53f7\u3002<\/li>\n<li><code>-f,  --file-system<\/code>\uff1a\u663e\u793a\u6587\u4ef6\u7cfb\u7edf\u800c\u4e0d\u662f\u6587\u4ef6\u7684\u72b6\u6001\u3002<\/li>\n<li><code>-c,  --format=FORMAT<\/code>\uff1a\u4f7f\u7528\u6307\u5b9a\u683c\u5f0fFORMAT\u800c\u4e0d\u662f\u9ed8\u8ba4\u7684\uff0c\u5728\u6bcf\u4e2aFORMAT\u540e\u9762\u8f93\u51fa\u4e00\u4e2a\u65b0\u884c\u3002<\/li>\n<li><code>--printf=FORMAT<\/code>\uff1a\u4e0e<code>--format<\/code>\u7c7b\u4f3c\uff0c\u4f46\u89e3\u91ca\u53cd\u659c\u6760\u8f6c\u4e49\uff0c\u4e14\u4e0d\u8f93\u51fa\u547d\u4ee4\u672b\u5c3e\u7684\u65b0\u884c\uff0c\u5982\u679c\u9700\u8981\u65b0\u884c\uff0c\u5728FORMAT\u91cc\u5305\u542b<code>\\n<\/code>\u3002<\/li>\n<li><code>-t,  --terse<\/code>\uff1a\u8f93\u51fa\u4fe1\u606f\u7684\u7b80\u6d01\u683c\u5f0f\u3002<\/li>\n<\/ul>\n<p>\u8f93\u51fa\u683c\u5f0f\u7684\u9009\u9879\u53c2\u8003man\u6587\u6863\u3002<\/p>\n<p><!--more--><\/p>\n<h3>\u4e3e\u4f8b<\/h3>\n<p><code>stat  cronlog<\/code>\uff1a\u663e\u793acronlog\u6587\u4ef6\u7684\u4fe1\u606f\u3002<\/p>\n<p><code>stat  cronlog  cronfile<\/code>\uff1a\u540c\u65f6\u663e\u793acronlog\u3001cronfile\u6587\u4ef6\u7684\u4fe1\u606f\u3002<\/p>\n<pre><code>\n  File: `cronlog'\n  Size: 12              Blocks: 8          IO Block: 4096   regular file\nDevice: f4e7h\/62695d    Inode: 300550903   Links: 1\nAccess: (0644\/-rw-r--r--)  Uid: (    0\/    root)   Gid: (    0\/    root)\nAccess: 2013-05-27 16:07:57.465230269 +0800\nModify: 2013-05-27 00:01:01.914228846 +0800\nChange: 2013-05-27 16:18:04.179228453 +0800\nBirth: -\n  File: `cronfile'\n  Size: 82              Blocks: 8          IO Block: 4096   regular file\nDevice: f4e7h\/62695d    Inode: 300549750   Links: 1\nAccess: (0644\/-rw-r--r--)  Uid: (  102\/maintainer)   Gid: (    0\/    root)\nAccess: 2013-05-27 15:21:21.812228571 +0800\nModify: 2013-05-03 11:45:41.845183666 +0800\nChange: 2013-05-27 16:18:04.178228403 +0800\nBirth: -\n<\/code><\/pre>\n<p><code>stat  -t  cronlog<\/code>\uff1a\u663e\u793a\u6587\u4ef6\u7684\u7b80\u6d01\u4fe1\u606f\u3002<br \/>\n     <code>cronlog 12 8 81a4 0 0 f4e7 300550903 1 0 0 1369642077 1369584061 1369642684 0 4096<\/code><\/p>\n<p><code>stat  -f  .<\/code>\uff1a\u663e\u793a\u6587\u4ef6\u7cfb\u7edf\u7684\u4fe1\u606f\u3002<\/p>\n<pre><code>\n  File: \".\"\n    ID: 2de67ba5c706b643 Namelen: 255     Type: ext2\/ext3\nBlock size: 4096       Fundamental block size: 4096\nBlocks: Total: 2621440    Free: 2065708    Available: 2065708\nInodes: Total: 5242880    Free: 5196731\n<\/code><\/pre>\n<hr\/>\n<p>\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u5fae\u4fe1\u516c\u4f17\u53f7: <strong>coderbee\u7b14\u8bb0<\/strong>\uff0c\u53ef\u4ee5\u66f4\u53ca\u65f6\u56de\u590d\u4f60\u7684\u8ba8\u8bba\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"258\" height=\"258\" src=\"https:\/\/coderbee.net\/wp-content\/uploads\/2019\/01\/coderbee-note.jpg\" class=\"alignnone size-full wp-image-1707\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>stat \u663e\u793a\u6587\u4ef6\u6216\u6587\u4ef6\u7cfb\u7edf\u7684\u72b6\u6001\u3002 \u4f7f\u7528\u5f62\u5f0f stat [option]&#8230; &hellip; <a href=\"https:\/\/coderbee.net\/index.php\/linux\/20130527\/151\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[29,48],"_links":{"self":[{"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/posts\/151"}],"collection":[{"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/comments?post=151"}],"version-history":[{"count":2,"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/posts\/151\/revisions"}],"predecessor-version":[{"id":153,"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/posts\/151\/revisions\/153"}],"wp:attachment":[{"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/media?parent=151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/categories?post=151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/tags?post=151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}