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


Click here to return to the 'Make the locate command ignore certain directories' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Make the locate command ignore certain directories
Authored by: klktrk on Nov 14, '03 02:18:21PM

Okay, so the code has to look like this ( The \! has to go before the parentheses).

Like so:

find ${SRCHPATHS} \! \( -path '/Volumes*' -o -path '/Previous Systems*' \
-o -fstype local -o -fstype fdesc -o -fstype devfs \) -a \
-prune -o -print | \
tr '/' '\001' | \
(sort -T "$TMPDIR" -f; echo $status > $errs) | tr '\001' '/' > $filelist



This seems to be working.



[ Reply to This | # ]