Linux for Enterprises

Saturday, October 1, 2011

Search and Replace large files inplace

using sed

find /path/to/files -type f -exec sed -i 's/fromString/toString/g' {} \;


using perl

find /path/to/files -type f -exec perl -pi -e  's/fromString/toString/g' {} \;

Posted by Tharun at 2:00 PM No comments:
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Blog Archive

  • ►  2015 (1)
    • ►  August (1)
  • ►  2014 (3)
    • ►  August (1)
    • ►  February (1)
    • ►  January (1)
  • ►  2013 (5)
    • ►  October (1)
    • ►  July (1)
    • ►  June (1)
    • ►  April (1)
    • ►  January (1)
  • ►  2012 (1)
    • ►  February (1)
  • ▼  2011 (4)
    • ▼  October (1)
      • Search and Replace large files inplace
    • ►  June (1)
    • ►  March (2)
  • ►  2010 (4)
    • ►  August (1)
    • ►  July (1)
    • ►  May (1)
    • ►  April (1)
  • ►  2009 (1)
    • ►  January (1)
  • ►  2008 (24)
    • ►  September (2)
    • ►  July (3)
    • ►  June (7)
    • ►  May (2)
    • ►  April (2)
    • ►  March (8)

Search

About Me

Tharun
View my complete profile
Awesome Inc. theme. Powered by Blogger.