Jump to content

finding lost data declarations


wejofost

Recommended Posts

:-[  I have over 230 files plus 39 directories ( 3.5Mb ) in my public_html directory and I am looking for where I specified/declared the contents of a variable!  I can't for the life of me remember in which web page/directory I set up the contents of that run time variable.  ( It was three years ago! )

Can anyone advise me how find that data variable  ( Its called $depositrules )?

Link to comment
Share on other sites

Thank you for your reply.  I fully understand that Text Editors can search a slected file for matching data but I have not yet come across a Text Editor that can open directories and search multiple files.

 

The old Windows 2000 professional can search a whole series of directories for data strings within a whole series of files but I can't do that in Vista and Windows 7?

 

 

Link to comment
Share on other sites

Since you're using Windows, go get yourself UnixTools from sourceforge and use find and grep:

 

If myVar is the variable you're looking for:

find . -type f -name "*.php" -exec grep -il myvar {} \;

 

That will list every file that contains: myvar (case insensitive).

 

If you want to find assignments to myvar, this might get you there:

find . -type f -name "*.php" -exec grep -ilE 'myvar[ ]*=' {} \;

 

Best of luck.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.