How 2 Know
If you can't Google it, You Can Knowing it.

Posts Tagged ‘string’

Recursively replacing a string in all files in a directory

Wednesday, April 11th, 2018

You can use the following command to change Specific string on all files under specific directory:

find /u01/directory -type f | xargs perl -pi~ -e ‘s/oldtext/newtext/g;’

Tested on Linux & AIX

Ref:
https://blogs.oracle.com/rammenon/recursively-replacing-a-string-in-all-files-in-a-directory-linux