Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _FILE_OFFSET_BITS 64
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <unistd.h>
- int scan(const char *path, const struct stat *stat_s, int st_mode)
- {
- /* nothing yet */
- return 0;
- }
- int main(int argc, char *argv[])
- {
- if (argv[1] == NULL) {
- printf("\nUsage: %s [path]\n\n", argv[0]);
- return -1;
- }
- if (ftw(argv[1], &scan, 1)) {
- perror("ftw");
- return 2;
- }
- }
Add Comment
Please, Sign In to add comment