Getting file names in a directory using C on linux.
Hi All,
I need a small program using C to get all file names in a specified directory in linux by giving file type as input (like *.c or *.so). Thanks in advance, Suresh B |
Why are you trying to reinvent find or ls?
|
rajsun: Use the opendir() function to read the files in a directory.
|
opendir()
sacndir() closedir() .. see dirent.h |
You can also look here:
http://www.linuxquestions.org/questi...hreadid=331944 It's another thread in the same forum, but related to processes... |
All times are GMT -5. The time now is 03:18 PM. |