kingandy: (Frowny)
[personal profile] kingandy
http://www.pcplus.co.uk/tips/default.asp?pagetypeid=2&articleid=5870&subsectionid=390

The "Containing Text" field of the built-in Windows XP search system only works on extensions it recognises[1]. Unless you tell it to search everything, which is an option hidden in the File Indexing service - which doesn't even have to be turned on, but the option has to be set inside it anyway.

I mean, what the fuck.

[1] In theory this is so that the system doesn't waste your time, say, looking through image files for some text. Of course any reasonable person would tell it "don't search these files" rather than "only search these other files". Quite apart from the fact that there are people out there who genuinely want to search through image files for specific characters, it's annoying because apparently ASP and PHP aren't on the list of approved file types. Because whoever would want to look for text inside one of those?

Extensions suck...

Date: 2005-06-06 02:14 pm (UTC)
From: [identity profile] stsquad.livejournal.com
...as a way to determine file type. I like the magic number approach so much better:

15:13 alexjb@okra [dotfiles] >file ~/mysrc/c/binmerge/binmerge.c
/home/alexjb/mysrc/c/binmerge/binmerge.c: ASCII C program text
15:13 alexjb@okra [dotfiles] >file ~/mysrc/dotfiles/dotbashrc
/home/alexjb/mysrc/dotfiles/dotbashrc: Bourne-Again shell script text

Re: Extensions suck...

Date: 2005-06-06 02:17 pm (UTC)
From: [identity profile] stsquad.livejournal.com
Which of course makes searching all files which contain text an easy* case of:

find ~/mysrc/ -xtype f | xargs file | grep "text" | perl -ne 'm/(.*):/; print "$1\n";' | xargs grep "what I look for"


*easy being by definition, didn't need to think hard about that, rather than looks pretty on the screen.

Re: Extensions suck...

Date: 2005-06-06 02:30 pm (UTC)
From: [identity profile] stsquad.livejournal.com
"conscious decision"

Well its a failing of the GUI as a user interface. Yes they are easy to pick up, but its quite easy to go beyond the bounds of what the UI designers planned for, especially if your an advanced user. I run in a GUI environment here and at home but you can take the command line out of my cold dead fingers. Its just too useful.

You can of course install Cygwin on your machine if you want the command line power of Un*x on Windows.

Re: Extensions suck...

Date: 2005-06-06 02:37 pm (UTC)
From: [identity profile] stsquad.livejournal.com
Yeah, but findutils is a search engine. You also get slocate thrown in for free.

Date: 2005-06-06 10:20 pm (UTC)
icklejo: (Default)
From: [personal profile] icklejo
Yes, it's a pain in the arse. We use .jtp and .jphtml files at work, which are basically html files. Not that the search mechanism bothers to notice this as you say.

March 2012

S M T W T F S
    123
45678910
11121314151617
18192021222324
25 262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 30th, 2025 04:39 am
Powered by Dreamwidth Studios