Word recursive replacement

Search for a word inside every files in current folder and replace it with sed

One line

find . -type f -print0 -exec sed -i 's/hello/hi/g' {} +

(we can add -name "*.txt" option to restrict the recursion and speed up the work)

Just for searching

grep -R {something_to_look_for} {where_to_look_in}

Using locate to search for file NAME

(before run updatedb)

locate {word}

Laissez un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors