Hi friends,
i want a program to print all the files in a directory recursively without using ls command and system command. Any body have idea let me know?
Hi friends,
i want a program to print all the files in a directory recursively without using ls command and system command. Any body have idea let me know?
Well, to start with, look up readdir(3) in your manpages, as well as opendir.
Or even the FAQ
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Hi,
You can do it using FTW (file tree walk), do man ftw to get more details. using the api ftw, u can give the directory name and a pointer to a function, in the function use must print the file name. It is very easy. hope this will help you.