Using find to use sed on multiple directories

November 10th, 2006 es

Sed is a powerful line editor which can be used to modify text files in a non-interactive manner. Explaining it’s use would be to lengthy so I’ll just paste here it’s man page. The problem is that sed doesn’t allow us to use it across subdirectories but this can be easily achieved using find:
find ./ -type f -exec sed -e '[expression]‘ {} \;

  • Meneame
  • Facebook
  • del.icio.us
  • BarraPunto
  • Slashdot
  • Technorati
  • Digg
  • e-mail
  • TwitThis
  • BlogMemes Sp
  • Reddit
menéame

Leave a Reply