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 de messagerie ne sera pas publiée.

Search
Generic filters
Exact matches only
Filter by Custom Post Type