Programming Q&A

Thursday, November 12, 2015

How to replace string in all files recursively on Linux?

Next Linux command replaces string 'old_data' by string 'new_data' in all files in current directory on Linux:

find . -type f -exec sed -i 's/old_data/new_data/g' {} +
Posted by metal4people at 1:08 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Blog Archive

  • ►  2022 (1)
    • ►  June (1)
  • ►  2021 (1)
    • ►  April (1)
  • ►  2019 (1)
    • ►  January (1)
  • ►  2017 (2)
    • ►  August (2)
  • ►  2016 (3)
    • ►  August (2)
    • ►  March (1)
  • ▼  2015 (6)
    • ▼  November (1)
      • How to replace string in all files recursively on ...
    • ►  October (1)
    • ►  September (1)
    • ►  January (3)
  • ►  2014 (13)
    • ►  December (2)
    • ►  November (1)
    • ►  September (4)
    • ►  May (1)
    • ►  April (2)
    • ►  March (1)
    • ►  February (2)
  • ►  2013 (9)
    • ►  December (3)
    • ►  October (2)
    • ►  July (4)
Simple theme. Powered by Blogger.