1 #include <sys/types.h> 2 #include <sys/stat.h> 3 #include <unistd.h> 4 5 int exists_main(int argc, char *argv[]) 6 { 7 struct stat s; 8 9 if(argc < 2) return 1; 10 11 if(stat(argv[1], &s)) { 12 return 1; 13 } else { 14 return 0; 15 } 16 } 17