Untitled
public text v1 · immutable#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);
}
}