Results 1 to 4 of 4

Thread: web hosting question

  1. #1
    Join Date
    May 2010
    Beans
    108
    Distro
    Ubuntu 12.04 Precise Pangolin

    web hosting question

    Let's say you just purchased 250 web hosting clients from "Joe's Hosting" and you've moved them all over to your servers.. and there's only one thing left to do..

    At the bottom of 200 of the 250 websites that Joe created there's a couple lines you'd like to replace:

    Host At Joe's!
    Proudly hosted by Joe's Hosting

    You'd like to replace it with:

    Hosted by Sam's Internet
    Visit: www.SamsInternet.com

    All of the sites live in /home/joes/hosting/
    They're all a mismatch of different types of sites - so the footers will be in different filenames..

    How would this best be solved?
    Not having Windows on your computer is like
    not having bricks tied to your dogs collar.

    The shin bone is a device for finding furniture in a dark room.

  2. #2
    Join Date
    Feb 2006
    Location
    uk
    Beans
    Hidden!

    Re: web hosting question

    there are loads of ways to do this, obviously. a quick google turned up this discussion

    so you could use perl and do
    Code:
    perl -e "s/FIND/REPLACE/g;" -pi.save $(find path/to/DIRECTORY -type f)
    now i dont know perl.. i dont know if '-type f' means it'll only search text based files or if you may run into problems when it tries to search through images, for example.

    it goes without saying that whatever you do, make sure you have a backup before blasting through 200 client websites

  3. #3
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,724
    Distro
    Kubuntu 14.04 Trusty Tahr

  4. #4
    Join Date
    May 2010
    Beans
    108
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: web hosting question

    Great info guys! Thanks as always!
    Not having Windows on your computer is like
    not having bricks tied to your dogs collar.

    The shin bone is a device for finding furniture in a dark room.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •