User Name
Password
AppleNova Forums » Genius Bar »

F(#)* Spotlight


Register Members List Calendar Search FAQ Posting Guidelines
F(#)* Spotlight
Thread Tools
alcimedes
I shot the sherrif.
 
Join Date: May 2004
Send a message via ICQ to alcimedes  
2012-10-03, 10:15

Ok, anyone have any ideas here. I've got a website that I know contains references to former employees who are no longer here.

I downloaded the contents of our site with SiteSucker, so I now have a local copy of all the files.

I'm searching for a specific person's email address, so I search for user@domain.org.

I get 5 or 6 files in that directory that return. I know there are more. I can open other files up and look at this exact string of text. I can cut/paste out of the body of the HTML file into Spotlight and it can't find the thing right in front of it's face.

I've tried removing/reindexing, I rebuilt all the permissions and ACL settings from the new Lion repair options, I've tried manually forcing an index of the directory in question, you name it.

Nothing works.

So, anyone have any alternatives to Spotlight that work better and still will scan the contents of files on my drive (price isn't an issue) or are there other tips/tricks I could be trying to get Spotlight to not work so intermittently?

(edit: wouldn't you know it, after bitching about this and going back it's now come back with 4x as many results. My original question still stands though, is there anything more reliable than Spotlight? I've been having mixed results from Spotlight for years, so this isn't a one-time thing)

Google is your frenemy.
Caveat Emptor - Latin for tough titty
I tend to interpret things in the way that's most hilarious to me
  quote
Ryan
Veteran Member
 
Join Date: May 2004
Location: Promise Land of Trustafarians
 
2012-10-03, 10:39

Let's hit the command line!

Are all the files underneath one folder? I'll assume they are. I'm also assuming that you're only trying to find out *which* files contain the string. If you're trying to do a find/replace or something like that you can easily adjust these instructions to accomplish that.

Open up Terminal and follow these steps:

Code:
cd /path/to/site grep -rl "user@domain.org" .
That period at the end is significant. This will print out all the files which contain user@domain.org. If you want to replace it with foo@example.org you can do this:

Code:
cd /path/to/site sed -i .bak 's/user@domain.org/foo@example.org/g' *
This will do an in-place replace of user@domain.org with foo@example.org while also creating a copy of every modified file with the extension .bak.

Is this what you're looking for?
  quote
alcimedes
I shot the sherrif.
 
Join Date: May 2004
Send a message via ICQ to alcimedes  
2012-10-03, 11:28

Quote:
Originally Posted by Ryan View Post
Let's hit the command line!

Are all the files underneath one folder? I'll assume they are. I'm also assuming that you're only trying to find out *which* files contain the string. If you're trying to do a find/replace or something like that you can easily adjust these instructions to accomplish that.

Open up Terminal and follow these steps:

Code:
cd /path/to/site grep -rl "user@domain.org" .
That period at the end is significant. This will print out all the files which contain user@domain.org. If you want to replace it with foo@example.org you can do this:

Code:
cd /path/to/site sed -i .bak 's/user@domain.org/foo@example.org/g' *
This will do an in-place replace of user@domain.org with foo@example.org while also creating a copy of every modified file with the extension .bak.

Is this what you're looking for?
Sort of. Unfortunately I can't just directly upload everything back properly, as if I could I would totally just search/replace all of this crap and be done.

My primary concern is why Spotlight seems to scan *some* of a directory of files, but not all of it.

Google is your frenemy.
Caveat Emptor - Latin for tough titty
I tend to interpret things in the way that's most hilarious to me
  quote
Posting Rules Navigation
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Post Reply

Forum Jump
Thread Tools
Similar Threads
Thread Thread Starter Forum Replies Last Post
How is Spotlight any different? NeverFade Genius Bar 5 2007-12-06 15:16
Two Spotlight Questions manhattan17 Genius Bar 1 2006-02-18 02:19
spotlight issue davebenvenuti Programmer's Nook 0 2006-01-24 14:44
Xiph, QT, and Spotlight Yochanan Genius Bar 4 2005-11-29 05:05
Spotlight info feend Apple Products 2 2004-07-05 09:25


« Previous Thread | Next Thread »

All times are GMT -5. The time now is 16:47.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova