//View Tip #846
» Randomized find
» Count files by type
» Find last modified files on a filesystem
» Delete old files
Replace toto by foo in all file found by find.
It make a backup $file.bak
Similar Tips
» Add a line to files using find and echo» Randomized find
» Count files by type
» Find last modified files on a filesystem
» Delete old files
Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
find . -name *whatyouwant* -exec perl -pi.bak -e 's/toto/foo/g' {} \;
Replace toto by foo in all file found by find.
It make a backup $file.bak


pure shell solution