Archive for April, 2010

Yahoo MX Records

Monday, April 26th, 2010

At long last, I’ve gotten yahoo to reveal two of their mx records. So the next time you have a client that is hooked on yahoo mail, just setup their server to use yahoo’s mail servers.

Yahoo MX Records:
mx1.biz.mail.yahoo.com
mx2.biz.mail.yahoo.com

Thank you Yamu, from Yahoo!!

Sed find and replace in directory of files

Friday, April 9th, 2010

Today I needed to find and replace an error in 55,000 files, and decided to use grep and sed.
1) I created a sed source file with the following s/\$this/$this/g and saved it as s.sed (i’m removing the backslash in front of $this)
2) grep -rl ‘/$this’ /home/sandusky/pathtofiles/ | xargs sed -i -f s.sed

this second command looks for files in the path that contain the search term, then sed updates them for a single file you could just type it out, sed -i ‘s/find/replace/g’ < filename.ext (g for global replace all instances)