Tomasz Korwel

Search
Skip to content
  • Sitemap
  • Who am I?
    • Portfolio

Monthly Archives: October 2011

tips & tricks vault

Find and replace within multiple files

October 18, 2011 tomasz Leave a comment

I can’t remember how many times I needed this line recently. I also could never remember it (hm… do you see a pattern here?). So here it is for future reference:

find . -name "*.php" -print | xargs sed -i '.backup' 's/foo/bar/g'

It’s pretty much self explanatory. If I could only make it stick in my brain.

findreplace

programmer, administrator, engineer – my everyday fights with reality

Recent Posts

  • Favorite i3 coding change – 9 L (2.4 US gal) fuel tank
  • Growing ZFS pool
  • Os X Preferences stopped working? There is a fix for that!
  • Gone… electric!
  • Zend Studio running out of memory? There’s a fix for that!

Tags

9.1.5 9l fuel tank 10.7 apple Apple fusion backup BMW coding coreStorage cron dharing diy-zoning find fusion home brew data server homebrew storage hvac i3 image file Late 2010 linux Lion MacBook Pro Unibody mavericks Mountain Lion nas netatalk NSNamedColorSpace Os X postgres Preferences panes replace rsync server serveradmin software installation time machine Ubuntu Zend Framework Zend Framework 2 Zend Studio ZendStudio.ini ZF ZF2 zfs

Categories

  • Cars
  • Home brew NAS
  • Home Improvements
  • HVAC Zoning
  • ISPConfig
  • Life
  • OWFS
  • tips & tricks vault
  • Wheeling
  • Work

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Proudly powered by WordPress