All pastes #268597 Raw Edit

Untitled

public text v1 · immutable
·published 2006-12-05 21:13 UTC
rendered paste body
#include <dirent.h>
#include <sys/stat.h>

int	main(int argc, char **argv)
{
  struct dirent *p;
  struct stat	t;
  
  DIR	*dir;
  dir = opendir(argv[1]);
  while (p = readdir(dir))
    {
      stat(p -> d_name, &t);
      printf("%d\t ", t.st_nlink);
      printf("%d\t ", t.st_uid);
      printf("%d\t ", t.st_gid);
      printf("%d\t ", t.st_size);
      printf("%s\t ",  p -> d_name);
      printf("%d\t\n ", t.st_mtime);
    }
}