开发者

Bash dirs, files & files content renaming

I am trying to change a very simple w开发者_Python百科ord ("discussion") by another ("item") in a PHP script with files and a lot of subfolders.

I would like to change this word: 1- in all the files content 2- in the files names 3- in the directories names

A simple loop and some regexp could take care of 2 & 3, but how could I do 1 with bash?


use sed.

sed -i 's/discussion/item/g' <filename>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜