Well that was a tad embarrassing I thought I had lost the ability to grep. All I wanted to do was find any instances of jt1.name in files in the current directory, simple I thought :
grep jt1.name *
Nope
That returned loads of hits that didn’t match at all eg :
modules/UpgradeWizard/commit.php:$from_dir = clean_path(remove_file_extension($install_file) . "-restore");
modules/UpgradeWizard/SugarMerge/EditViewMerge.php: * this will store the meta data for the original file
modules/UpgradeWizard/SugarMerge/EditViewMerge.php: * this will store the meta data for the new file
modules/UpgradeWizard/SugarMerge/EditViewMerge.php: * this will store the meta data for the custom file
modules/UpgradeWizard/SugarMerge/EditViewMerge.php: * this will store an associative array contianing all the fields that are used in the original meta data file
modules/UpgradeWizard/SugarMerge/EditViewMerge.php: * this will store an associative array contianing all the fields that are used in the new meta data file
modules/UpgradeWizard/SugarMerge/EditViewMerge.php: * this will store an associative array contianing all the fields that are used in the custom meta data file
modules/UpgradeWizard/SugarMerge/EditViewMerge.php: * this will store an associative array contianing all the merged fields
modules/UpgradeWizard/SugarMerge/EditViewMerge.php: * Merges the fields together and stores them in $this->mergedFields
modules/UpgradeWizard/preflight.php: //Check the current and target versions and store them in session variables
modules/UpgradeWizard/silentUpgrade.php://look for session vars there and restore them
modules/UpgradeWizard/uw_ajax.php: $desc .= $persistence['uw_restore_dir']."\n\n";
modules/UpgradeWizard/uw_utils.php: * Backs-up files that are targeted for patch/upgrade to a restore directory
modules/UpgradeWizard/uw_utils.php: // create restore file directory
modules/UpgradeWizard/uw_utils.php: $_SESSION['uw_restore_dir'] = clean_path($rest_dir);
modules/UpgradeWizard/uw_utils.php: // get name of current file to place in restore directory
modules/UpgradeWizard/uw_utils.php: // only copy restore files for replacements - ignore new files from patch
modules/UpgradeWizard/uw_utils.php: $desc .= $_SESSION['uw_restore_dir'] . "\n\n";
modules/UpgradeWizard/uw_utils.php: if(isset($_SESSION['uw_restore_dir']))
modules/UpgradeWizard/uw_utils.php: unset($_SESSION['uw_restore_dir']);
modules/Meetings/Meeting.php:// Meeting is used to store customer information.
Pages of this came up. When I found the culprit I nearly fell off my chair, some fluffy-kittening person at SugarCRM decided that when doing an upgrade they would make a backup unfortunately they made an interesting choice of names…
drwxrws--- 3 www-data www-data 4096 Jan 12 10:42 -restore
drwxr-xr-x 19 www-data www-data 4096 Mar 9 16:43 .
drwxr-xr-x 3 root root 4096 Jan 23 2009 ..
-rw-r--r-- 1 www-data www-data 342 Mar 9 16:43 .htaccess
-rw-r--r-- 1 www-data www-data 2535 Mar 9 16:43 HandleAjaxCall.php
-rw-r--r-- 1 www-data www-data 155 Dec 17 2008 INSTALLATION.txt
-rw-r--r-- 1 www-data www-data 35147 Dec 17 2008 LICENSE.txt
drwxr-xr-x 3 www-data www-data 4096 Oct 22 14:52 ModuleInstall
-rw-r--r-- 1 www-data www-data 5075 Dec 17 2008 SugarSecurity.php
-rw-r--r-- 1 www-data www-data 5590 Dec 17 2008 TreeData.php
-rw-r--r-- 1 www-data www-data 2488 Mar 9 16:43 WebToLeadCapture.php
drwxr-xr-x 2 www-data www-data 4096 Dec 17 2008 XTemplate
-rw-r--r-- 1 www-data www-data 2490 Dec 17 2008 acceptDecline.php
drwxr-xr-x 17 www-data www-data 4096 Mar 9 16:44 cache
That explains why it recursed too…. I didn’t think you could add flags after the search string…