Lumalab

Search entriesDeutsch English
  
User:   Password:    
Forum > Linux > Replace text recursive in a directory
StartStopPage 1 of 1StopEnde
Author: EngysTopic: Replace text recursive in a directoryLast change: 2014-11-24 13:05:49 

To replace a text in all text files recursive in a directory the following command can be used:

find ./ -exec sed -i 's/<search>/<replace>/g' {} ;

Replace <search> with the text that should be replaced.
Replace <replace> with the text that should replace <search>.

UpReply 
StartStopPage 1 of 1StopEnde