My common unix command while administering a server:
How to find text in a file:
find . -type f -exec grep -i "my string to find" {} \; -print
Find and replace text inside the file using unix
sed -e 's/OLD TEXT/NEW TEXT/' -i myfiles*
How to find text in a file:
find . -type f -exec grep -i "my string to find" {} \; -print
Find and replace text inside the file using unix
sed -e 's/OLD TEXT/NEW TEXT/' -i myfiles*
No comments:
Post a Comment