title: How to get file creation date in Linux?
body: <p>I am working with batches of files that contain information about the same object at the different times of its life, and the only way to order them is by creation date.
  I was using this:</p>
  
  <pre><code>//char* buffer has the name of file
  struct stat buf;
  FILE *tf;
  tf = fopen(buffer,"r");
  //check handle
  fstat(tf, &amp;buf);
  fclose(tf);
  pMyObj-&gt;lastchanged=buf.st_mtime;
  </code></pre>
  
  <p>But that does not seems to work.
  What am I doing wrong? Are there other, more reliable/simple ways to get file creation date under Linux?</p>