SSH replace string example -
i need replace multiple (150+) config.php files on live server contain string
public_html/home2/cpaneluser
to
public_html/home/cpaneluser
can give me example of ssh string replace please.
if can give me example of replacing 1 , replacing multiple please . thank you!
use sed
. has not specific ssh
, way login remote server.
sed -i.bak 's|public_html/home2/cpaneluser|public_html/home/cpaneluser|' file1 file2 ...
you there 150+ files. can use find
find them , pass them command:
find <topdir> -name config.php -exec sed -i.bak 's|public_html/home2/cpaneluser|public_html/home/cpaneluser|' {} +
Comments
Post a Comment