Crmgo Blog

Search

Search

Search for text in files: grep -rl 'what_to_find' /path Find files: find / -name "filename" Replace text1 with text2 in all *.php files. find -type f -name \*.php -exec sed -i -r 's/text1/text2/g' {} \;

Search

Search for text in files:

grep -rl 'what_to_find' /path

Search for files:

find / -name "filename"

Replace text1 with text2 in all *.php files.

find -type f -name \*.php -exec sed -i -r 's/text1/text2/g' {} \;

Note: This post may be AI-assisted and then human-edited. Editorial responsibility: Dmytro Lomaka, Kaltenkirchen.