Sample Header Ad - 728x90

How to add specific directories to "updatedb" (locate) search path?

12 votes
3 answers
15870 views
I keep my digital music and digital photos in directories in a Windows partition, mounted at /media/win_c on my dual-boot box. I'd like to include those directories—but only those directories—in the locate database. However, as far as I can make out, updatedb.conf only offers options to exclude directories, not add them. Of course, I could remove /media from PRUNEPATHS, and then add a whole bunch of subdirectories (/media/win_c/Drivers, /media/win_c/ProgramData...) but this seems a very clunky way of doing it—surely there's a more elegant solution? (I tried just creating soft links to the Windows directories from an indexed linux partition, but that doesn't seem to help.)
Asked by ionh (153 rep)
Aug 22, 2014, 10:47 PM
Last activity: Nov 9, 2023, 10:08 PM