Hello ever one I want to ask a question about file opening.I want to write a program in which I will give a path to my main folder.main folder can contain files and and other folders which in again contain other folders and files.I want to open all the file in the loop and do some manipulation on them also I want to open only specific file for example .c extended file.Is there a built in program or function that do that? or atleast is there a way through which I can check which files are there in the folder so that I can repeatedly open them
I am using C programming linux Thanks
find?findcan find all files of certain criteria (like all files ending with ".c") and then call a program with that file as an argument:find /my/top/path -name '*.c' -exec /my/special/program '{}' \;. It can of course do more advanced filtering.