title: Wrong size when printing directories dimension(st_size)
body: <p>I want to the size of directories ,but for every directory the program prints "4096". How can I print the real size?</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;stdlib.h&gt;
  #include&lt;unistd.h&gt;
  #include&lt;sys/wait.h&gt;
  #include&lt;sys/types.h&gt;
  #include&lt;sys/stat.h&gt;
  
  int main(int argc,char* argv[]){
          int i,p[2];
          pipe(p);
          struct stat buf;
  
          for(i=1; i&lt;argc; i++){
                          printf("%s\n",argv[i]);
                          stat(argv[i],&amp;buf);
                          if(S_ISDIR(buf.st_mode)){
                                  printf("%s is a directory\n",argv[i]);
                                  printf("%zu", buf.st_size);
                           }
           }
  
           return 0;
  }
  </code></pre>
  
  <p>I tried <code>printf("%llu", (unsigned long long)buf.st_zise)</code> , <code>printf("%lu",(long unsigned)buf.st_size)</code> but the results are the same.</p>