I guess you're on Linux... ok?
It's very simple:
find <directory> -type f -name \*.c -print0 | xargs -0 -t sed -i 's/abc/ddd/g'
The first part of the command will find all files with extension .c under "directory" (you will have to use the real directory name here (for example a single '.' (dot) to look into your current directory). Filenames with extension .c are then passed via xargs
to sed
that will replace "in-place" all occurrences of "abc" with "ddd". Be aware: this command will replace ALL "abc" to "ddd" ("abc" > "ddd", "abcdefg" > "ddddefg", etc...). If you want something different or study how these commands work:
man find
man xargs
man sed