nov 18 2009

Replace string in multiple files

Category: Linuxguillem @ 6:30

To do a multiple file replace of a specified string, just run the following

perl -pi.bak -e ‘s/what to change/what to change to/g’ *

This also makes a backup of the files, with extension .bak

If you just want to modify, for example, PHP files, use the same but at the end replace ‘*’ with ‘*.php’

That’s all

Share


nov 04 2009

Find inside files

Category: Linuxguillem @ 7:04

Easy way to find inside files on Linux:

grep -r “what youre looking for” *

Yup, that’s it!

Share


nov 04 2009

Test email routing with exim

Category: Linuxguillem @ 7:01

This is just a quick note on how to check email router with exim:

exim -bt test@test.com

Where test@test.com is the address you’d like to test.

Share