ftw , nftw doesn't work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am trying to parse dir tree with ftw and nftw on Linux (debian) but without result.

------------------------------------------------------

#include <stdio.h>
#include <ftw.h>


int fn(const char *file, const struct stat *sb, int flag){

       printf("-->\n");
}


int main(int argc,char **argv){


       ftw("/etc/", fn, 5);

       return 0;
}

------------------------------------------------------

bash# gcc test.c
bash# ./a.out
-->
bash#

------------------------------------------------------

Does anyone knows what might be the problem.

tnx in advance.

-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux