#define _POSIX_C_SOURCE 1 #include #include #include #include int main(int argc, char *argv[]) { int i; for (i = 1; i < argc; i++) { struct stat statbuf; if (stat(argv[i], &statbuf) == -1) { perror(argv[i]); continue; } printf("%d\n", (int) statbuf.st_size); } return EXIT_SUCCESS; }