Chapbook
  • Home
    • Sitemap
  • Snippets
    • MySQL snippets
    • bash snippets
    • PERL snippets
    • PHP snippets
    • pgSQL snippets
  • Category Indexes
    • Cookery
    • Genealogy
    • Photography
    • Technology
    • Uncategorized
  • All Articles
    • Articles by category
    • Publications
      • Cemetery Crosses
      • History of Conecuh County, AL – Index
  • Contact
upArrow

Change a string recursively in all directories

 November 13, 2014 RLByrd   Snippets, bash, bash snippets, Misc Tools
Tags: sed, find, shell

Make sure you’re using GNU find and GNU sed.

find . -type f -exec sed -i 's/OLDSTRING/NEWSTRING/g' {} +

Related posts:

  1. Convert charset in all schemas within an instance
  2. Getting around “argument list too long”
  3. Automate with expect
  4. Redirect all shell output
  5. Check TCP connections and their remote origins
« Check TCP connections and their remote origins Generalized best practices »

Recent Posts

  • Types of marriage records
  • ONLY_FULL_GROUP_BY and you
  • Lincoln and Free Speech
  • What’s using my swap space?
  • English-to-Gaelic Name Equivalents

Tag Cloud

1st alabama15th alabama33rd alabama36th alabama57th alabamaalabamaapt-getartaudioauditbashblocksbookbrassbyrdcalendarcat mashCDNcentoscharsetchaverscivil warclientcocktailsconfigurationcookingcrimecsacyclonedatabasedavDBeaverDDLdevelopmentdigitaldrinksemailemergeeugeniaexportfilerunfindFlomatonfontsfrisco citygaelicgaleragenealogygmailGooglegrantsgraphicsGUIhardwarehighlandshilliard's legionhistoryIDEinstallationinstrumentsiOSiPadkuberneteslanguagelearninglinuxloadbalancinglocklockingmailmemorymexicanmonitoringmonroemonroe countymultibytemurdermusicmysqlmysqldumpnagiosnamesnetworkold texasopensourceOutlookpacmanpaintingperconaperformancephotosphysicspostfixpostgrespowerpointproductionproxysqlpublicationpythonrailroadrecipesrecordingRedshiftrelayremote accessresearchrestorationscottishsecuritysedshellslavesmithsoftwaresoldierstephen talmadgestuckeyswaptechnologytexastornadotroubleshootingunicodeutf8utilitiesvideovirtualizationwebwebdavwindowsyumzypper

Archives

Indexes

  • About
  • All Articles
  • Categories
  • Contact
  • Cookery Index
  • Genealogy Index
  • Home
  • Music Index
  • Photography Index
  • Search
  • Sitemap
  • Technology Index
  • The Digital Junk Drawer
  • Uncategorized Index

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • Chapbook
© 1982-2021, rlbyrd.com