How to edit html site with 400k pages (search replace)

Discussion in 'Programming' started by living2xl, Dec 9, 2016.

  1. living2xl

    living2xl Elite Member

    Joined:
    Dec 9, 2011
    Messages:
    1,810
    Likes Received:
    438
    Occupation:
    Sippin dat juice - Shout it louder!
    Location:
    Not sleeping!
    Home Page:
    tried sublime text editor and hangs also tried dreamweaver and crashes too
    https://findandreplace.codeplex.com/ this works but its slow as hell says its gonna take 4 hours to do one word replace and hey I have to do a shit load of replaces
     
  2. Apsconsus

    Apsconsus Registered Member

    Joined:
    Apr 22, 2013
    Messages:
    90
    Likes Received:
    41
    Gender:
    Male
    Location:
    Australia
    400k pages? What kind of site is that haha. That's a heck of a lot of content. Unfortunately I have no idea what to suggest

    Tell us more
     
  3. Conor

    Conor Elite Member

    Joined:
    Nov 7, 2012
    Messages:
    3,618
    Likes Received:
    6,078
    Gender:
    Male
    Location:
    South Africa
    Notepad++, CTRL H, Replace all in all opened documents.
     
    • Thanks Thanks x 1
  4. blogzandstuff

    blogzandstuff Elite Member

    Joined:
    Jan 1, 2015
    Messages:
    8,388
    Likes Received:
    4,357
    Occupation:
    blog creator
    Location:
    UK
    I use notpad++ it's never really mentioned much, so versatile and free
     
  5. royserpa

    royserpa Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 28, 2011
    Messages:
    5,103
    Likes Received:
    3,857
    Gender:
    Male
    Occupation:
    Negative Options aka Rebills!
    Location:
    Exploiting Loopholes!
    Home Page:
    You want notepad++ to open 400k documents?!
     
  6. RightFootFanatic

    RightFootFanatic Regular Member

    Joined:
    May 31, 2015
    Messages:
    441
    Likes Received:
    244
    Occupation:
    DevOps
    Location:
    Whimsyshire
  7. Purush

    Purush Senior Member

    Joined:
    Jul 12, 2016
    Messages:
    1,163
    Likes Received:
    189
    Gender:
    Male
    its so big . curious to know answer.
     
  8. pauleylo

    pauleylo Newbie

    Joined:
    Nov 12, 2016
    Messages:
    46
    Likes Received:
    8
    Gender:
    Male
    Occupation:
    Money Maker
    Try this linux command:

    for page in *.html; do sed -i "" "s/WORD TO REPLACE/WORD TO REPLACE WITH/g" page; done
     
    • Thanks Thanks x 1
  9. kahuna74

    kahuna74 Regular Member

    Joined:
    Aug 19, 2014
    Messages:
    288
    Likes Received:
    108
    Gender:
    Male
    Occupation:
    Software Developer
    Location:
    Grand Rapids, MI
    I came here to tell you that you need to learn how to use "sed", but paulylo beat me to it.
     
  10. Sristy

    Sristy Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 17, 2010
    Messages:
    2,118
    Likes Received:
    571
    Gender:
    Female
    Location:
    In My Blog Network
    Home Page:
    Why don't you move the site to a CMS and then it is a breeze to do this using plugins & modules.
     
  11. GoDesain

    GoDesain Regular Member

    Joined:
    Feb 26, 2011
    Messages:
    481
    Likes Received:
    208
    notepad++ and use CTRL + SIFT + F