On cygwin, updatedb often gives “Permission denied” errors (e.g. for “C:/System Volume Information”) and “File name too long” errors (e.g. for files in “/cygdrive/c/Documents and Settings/MyName/Local Settings/Temporary Internet Files”).
And attempts to use the “–prunepaths” option to avoid indexing these seem not to work due to the spaces in the filenames. But there is a fix … From the Cygwin mailing list comes the following tip — you can type something like
updatedb --prunepaths='/proc /cygdrive/c/Documents.and.Settings/MyName/Local.Settings/Temp'
to avoid these — prunepaths accepts regular expressions, including the use of a dot (.) to represent any character including a space.
My fix looks something like the following (line breaks inserted for legibility):
updatedb --prunepaths='/proc /cygdrive/c/program_disk/cygwin /cygdrive/c/Documents.and.Settings/[^/]*/Local.Settings/Temp /cygdrive/c/Documents.and.Settings/[^/]*/Local.Settings/Temporary.Internet.Files /cygdrive/c/Documents.and.Settings/[^/]*/Local.Settings/Application.Data/Mozilla/Firefox/Profiles/[^/]*/Cache /cygdrive/[^/]*/System.Volume.Information /cygdrive/c/data/System.Volume.Information /cygdrive/c/backup/System.Volume.Information /cygdrive/c/shared/System.Volume.Information /cygdrive/c/program_disk/System.Volume.Information /cygdrive/g /cygdrive/h '
Thanks. I was wondering how to do that.
So either there is a config file which can be passed (need to RTM) or you could pass this on the command line using `cat file-containing-prunepaths`
locate/updatedb are better than using google to index your desktop. As you can pipe the output from locate through whatever combo you like.
Have Fun
Paul
Comment by PaulM — 4 April 2008 @ 8:53 pm
Nice one, I’ve been looking for a solution to that for ages. What I found awkward was that the same updatedb with prunepaths behaves different on different systems, for example on my work XP Prof it runs fine, but on my home XP Home it wouldn’t.. until now.
Cheers, Bog
Comment by Bog — 28 January 2009 @ 12:45 pm