Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Path Finder 5 - The Finder, greatly enriched again' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Path Finder 5 - The Finder, greatly enriched again
Authored by: Anonymous on Aug 19, '09 07:10:50AM
vi? Why not sed? If the files all match some basic criterion, then it's highly likely you're going to be doing the same edit. So more like this then:
find /var/www -iname "*.html" -iname "*.php" -exec sed -i.$(date +%Y%m%d) -e 's/Copyright 2009/Copyright 2010/g' {} ;
mkdir -p ~/old_files
find /var/www -iname "*.$(date +%Y%m%d) -e mv {} ~/old_files ;
I agree on that point: If you're doing something complex, use the appropriate tool.

But I disagree on using Spotlight. If you're doing something simple, then you don't need anything more than the straight Finder. If your documents are cluttered or named inappropriately, then it's time you devoted a day to housekeeping. Spotlight could help out there, but it's of no practical use in a well-ordered filesystem.

[ Reply to This | # ]

Path Finder 5 - The Finder, greatly enriched again
Authored by: tedw on Aug 19, '09 12:52:07PM
well, what can I say - I have oodles of script files hanging around on my machine (php, javascript, ruby, etc.). many I've made myself, many I've downloaded as self-tutoring examples. I just love the fact that if I forget the right syntax for (say) createElement(), I can type createElement in spotlight and have a shortlist of all the files on my machine where that function is used. It takes me 20-30 seconds to find an example, rather than the 5 frustrating minutes or so I'd need if I had to dig through the file system (or god help me if I tried it using unix - and yes, I'm pretty good with unix). Spotlight has its flaws, no question, but sometimes (as Churchill so aptly put it) it's the worst system available except for all the others.

[ Reply to This | # ]