#include #include int main(int argc, char *argv[]) { FTS *f; FTSENT *e; f = fts_open(argv + 1, FTS_PHYSICAL | FTS_NOCHDIR | FTS_NOSTAT, NULL); while ((e = fts_read(f)) != NULL) if (e->fts_info != FTS_DNR && e->fts_info != FTS_DP && e->fts_info != FTS_ERR) puts(e->fts_path); }