取代資料夾內所有檔案的字串

Posted on 三月 21, 2008. Filed under: Linux | 標籤:, |

把aaa 取代成 bbb (遇到特殊符號可以用\跳脫字元)

find ./ -type f -exec sed -i 's/aaa/bbb/' {} \;

把linux/config.h 取代成 linux/autoconf.h

find ./ -type f -exec sed -i 's/linux\/config.h/linux\/autoconf.h/' {} \;

繼續閱讀 | Make a Comment ( None so far )

Liked it here?
Why not try sites on the blogroll...