Hello!
For reconfigure BusyBox you should change directory to BusyBox source directory and run "make config" config.
For output format time string you can use http://man7.org/linux/man-pages/man3/strftime.3.html and http://man7.org/linux/man-pages/man2/stat.2.html for get information, example:
#include <stdio.h>
#include <sys/stat.h>
#include <errno.h>
#include <string.h>
#include <time.h>
int main(int argc, char *argv[])
{
if (argc != 2)
printf("Unknown file!\n");
else {
struct stat info;
const char *file = argv[1];
if (stat(file, &info))
printf("Failed get information abot \"%s\", errno %d (%s)\n",
file, errno, strerror(errno));
else {
char at[30] = {0}, mt[30] = , ct[30] = ;
strftime(at, 30, "%F %T %z", localtime(&info.st_atime));
strftime(mt, 30, "%F %T %z", localtime(&info.st_mtime));
strftime(ct, 30, "%F %T %z", localtime(&info.st_ctime));
printf("Information about %s\n"
"inode %u\n"
"owner %u\n"
"group %u\n"
"size %u\n"
"last access %s\n"
"last modification %s\n"
"last change %s\n",
file,
info.st_ino,
info.st_uid,
info.st_gid,
info.st_size,
at,
mt,
ct);
}
}
return 0;
}
And output:
$ ./a.out a.out
Information about a.out
inode 6291480
owner 1000
group 1000
size 8118
last access 2014-03-20 11:16:12 +0400
last modification 2014-03-20 11:16:11 +0400
last change 2014-03-20 11:16:11 +0400
$ ./a.out /etc
Information about /etc
inode 7340033
owner 0
group 0
size 4096
last access 2014-03-20 11:07:01 +0400
last modification 2014-03-20 11:06:55 +0400
last change 2014-03-20 11:06:55 +0400