Scan for files and replace string? - TechRepublic
General discussion
January 31, 2000 at 06:59 PM
resch

Scan for files and replace string?

by resch . Updated 25 years, 8 months ago

What is a foolproof way to scan a directory structure for files containing certain text strings and
1. produce a list of all the files containing the string and/or
2. replace the string with another string

The script (or whatever solution is available) should ignore links made with “ln -s” (I’m aware of grep and find, but find tells me that there are too many nested links).

Must work on FreeBSD.

This discussion is locked

All Comments