WibbleWobbleWah : linkchange

home :: about :: gallery :: linux :: links :: other :: recent changes :: contact
tar xvf public_html.tar
cd public_html/

//build a list of all the files I want to change
find . -type f |xargs -i grep -l "gallery.html" {} >list

//edit out the .listing as I used wget to mirror this down from the webserver
vi list

// for every file on the list
// make a copy (.bak)
// read the .bak , sed the changes and send the result to the original file

while read file;
do cp $file ${file}.bak;
sed "s/gallery.html/gallery.php/g" ${file}.bak >$file;
done < list

ls -lrt
//check the edits
vimdiff gallery-WA.html.bak gallery-WA.html

//get rid of all the .bak files I made
find . -type f |grep ".bak" |xargs -i rm {}
Powered by 1.1.6.1
Page was generated in 0.0361 seconds