:) I have a directory with 50 .c files. I want to change "string1" in all
:) files to "string2".
:) mv "string1" "string2"
If string1 is in the files (as opposed to filenames), then this question
has been answered, if string1 is in the filenames you should use something
ls -1 | grep string1 | sed 's/\(.*\)string1\(.*\)/mv \1string1\2 \1string2\2/'| sh
before you do this, however delete the last "| sh" of the command, and run
the command as it is, it should give you a list of commands of the form:
mv string1 string2
the |sh part will execute all of those rename commands, so make sure that
it will do its job correctly, before you execute the "|sh" part.