Question : Finding and Replacing a File using Bash

Hello all,

I have several joomla web sites on a server that use a component that contains a file that needs to be updated. The updated file is contained in root's home directory and is called directions.html.php

The web directories are contained in /home/www

I need to write a bash script or equivalent that will go down the home/www tree look for directions.html.php and replace it with the one that is /root/directions.html.php.

This file is found in the follow directory structure:

/home/www/www.somewebsite.com/web/components/com_directions/directions.php.html

I am not a Bash programmer, so any help with this would be greatly appreciated.

Answer : Finding and Replacing a File using Bash

My command verbosely prints what is happening, just redirect to txt file " command >> the/log/file/txt "
Random Solutions  
 
programming4us programming4us