RSS

Recursive Replace in Files Folders

11 Dec
Hello Friends,
Some time we want to change branding of web based softwares. Open source web based software have GNU License. We can modify the code and launch versions.
We can use PERL (Perl is a highly capable, feature-rich programming language with over 22 years of development.)
Here are some basic steps to Recursive Replace Rename Files, Variables, Folder Name etc.
Let you have a project in folder "/root/svnlabs"
To replace search string in all filename and foldernames recursively

# chmod a+x ./RecursiveRegexpRename.pl

# perl RecursiveRegexpRename.pl -m g 'search_text' 'replace_text'

# chmod a+x ./SearchAndReplaceInMultipleFiles.pl

# perl SearchAndReplaceInMultipleFiles.pl -m g 'Search' 'Replace'

# grep -iRl 'Search' /root/svnlabs  (Now search in your project)

If you would hit the mark, you must aim a little above it 😉
Advertisements
 
1 Comment

Posted by on December 11, 2010 in CentOS, Linux, php, Tips, Tricks, Web Services

 

Tags: , , , , , , ,

One response to “Recursive Replace in Files Folders

  1. Swiss Ball Exercises

    December 15, 2010 at 9:47 am

    I’ve recently started a blog, the information you provide on this site has helped me tremendously. Thank you for all of your time & work.

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: