
{"id":5900,"date":"2009-12-28T16:29:08","date_gmt":"2009-12-28T10:59:08","guid":{"rendered":"http:\/\/froisa.com\/?p=179"},"modified":"2009-12-28T16:29:08","modified_gmt":"2009-12-28T10:59:08","slug":"stat-2","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2009\/12\/28\/stat-2\/","title":{"rendered":"stat &#8211; display file or file system status"},"content":{"rendered":"<h4><u>A UNIX Command  stat -f  \/ <\/u><\/h4>\n<pre>\n$stat -f \/\n  File: \"\/\"\n    ID: bc427fdafb7b0541 Namelen: 255     Type: ext2\/ext3\nBlock size: 4096       Fundamental block size: 4096\nBlocks: Total: 18864769   Free: 16209639   Available: 15251363\nInodes: Total: 4792320    Free: 4684854\n$\n\n<\/pre>\n<h4><u> UNIX Explanation <\/u><\/h4>\n<p>Display file or file system status.<\/p>\n<h4><u>Related Source Code Exposition <\/u><\/h4>\n<p><code><br \/>\nstatic bool<br \/>\ndo_statfs (char const *filename, bool terse, char const *format)<br \/>\n{<br \/>\n  STRUCT_STATVFS statfsbuf;<\/p>\n<p>  if (STATFS (filename, &amp;statfsbuf) != 0)<br \/>\n    {<br \/>\n      error (0, errno, _(\"cannot read file system information for %s\"),<br \/>\n             quote (filename));<br \/>\n      return false;<br \/>\n    }<\/p>\n<p>  if (format == NULL)<br \/>\n    {<br \/>\n      format = (terse<br \/>\n                ? \"%n %i %l %t %s %S %b %f %a %c %d\\n\"<br \/>\n                : \"  File: \\\"%n\\\"\\n\"<br \/>\n                \"    ID: %-8i Namelen: %-7l Type: %T\\n\"<br \/>\n                \"Block size: %-10s Fundamental block size: %S\\n\"<br \/>\n                \"Blocks: Total: %-10b Free: %-10f Available: %a\\n\"<br \/>\n                \"Inodes: Total: %-10c Free: %d\\n\");<br \/>\n    }<\/p>\n<p>  print_it (format, filename, print_statfs, &amp;statfsbuf);<br \/>\n  return true;<br \/>\n}<\/p>\n<p><\/code><\/p>\n<h4><u>Source Code Highlight <\/u><\/h4>\n<pre>\nStat the file system and print what we find.\n<\/pre>\n<p><\/p>\n<h4><u>Featured Image <\/u><\/h4>\n<p><a href=\"http:\/\/www.trueangle.org\/wp-content\/uploads\/2011\/05\/f0836-stat-may-7-2.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.trueangle.org\/wp-content\/uploads\/2011\/05\/f0836-stat-may-7-2.png\" alt=\"\" title=\"stat-May-7\" width=\"406\" height=\"226\" class=\"alignnone size-full wp-image-5162\" srcset=\"https:\/\/www.trueangle.org\/wp-content\/uploads\/2011\/05\/f0836-stat-may-7-2.png 406w, https:\/\/www.trueangle.org\/wp-content\/uploads\/2011\/05\/f0836-stat-may-7-2-300x167.png 300w\" sizes=\"(max-width: 406px) 100vw, 406px\" \/><\/a><\/p>\n<h4><u> Related Knowledge <\/u> <\/h4>\n<pre>\nDue to  shell aliases and built-in  `stat' command, using\nan unadorned `stat' interactively  or in a script may get\nyou  different functionality  than  that described  here.\nInvoke  it via  `env' (i.e.,  `env stat  ...')   to avoid\ninterference from the shell.\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A UNIX Command stat -f \/ $stat -f \/ File: &#8220;\/&#8221; ID: bc427fdafb7b0541 Namelen: 255 Type: ext2\/ext3 Block size: 4096 Fundamental block size: 4096 Blocks: Total: 18864769 Free: 16209639 Available: 15251363 Inodes: Total: 4792320 Free: 4684854 $ UNIX Explanation Display file or file system status. Related Source Code Exposition static bool do_statfs (char const *filename, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2009\/12\/28\/stat-2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;stat &#8211; display file or file system status&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":-1,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[83],"tags":[762,1486,1488],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/5900"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=5900"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/5900\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=5900"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=5900"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=5900"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}