Date: Mon, 17 Nov 2008 03:44:42 +0100 From: clemens fischer <ino-news@spotteswoode.dnsalias.org> To: freebsd-questions@freebsd.org Subject: locate: how to prune .svn directories? Message-ID: <qd27v5x787.ln2@nntp.spotteswoode.dnsalias.org>
next in thread | raw e-mail | index | archive | help
Hi, I am trying to remove all the ".svn" directories and their contents from /var/db/locate.database. The uncommented entries in /etc/locate.rc look like this: # /etc/locate.rc - command script for updatedb(8) # SEARCHPATHS="/" # PRUNEPATHS="/tmp /usr/tmp /var/tmp" PRUNEPATHS="${PRUNEPATHS} /var/db/portsnap" PRUNEPATHS="${PRUNEPATHS} /mnt" PRUNEPATHS="${PRUNEPATHS} /usr/src-test" # PRUNEPATHS="${PRUNEPATHS} '/*/.svn'" # FILESYSTEMS="ufs zfs" pstree output looks like this: |-+= 06945 root sh /etc/periodic/weekly/310.locate | \-+- 06950 root su -fm nobody | \-+= 06951 nobody su (bash) | \-+- 06952 nobody /bin/sh /usr/libexec/locate.updatedb | |--- 06955 nobody find -s / ! ( -fstype ufs -or -fstype zfs ) -prune -or -path /tmp -prune -or -path /usr/tmp -prune -or -path /var/tmp -prune -or -path /var/db/portsnap -prune -or -path /mnt -prune -or -path /usr/src-test -prune -or -path '/*/.svn' -prune -or -print | \-+- 06956 nobody /bin/sh /usr/libexec/locate.mklocatedb -presort | \--- 06958 nobody locate.code /tmp//locate8nuvNUT2eT/mklocateXYh7Vi1XUR/_mklocatedb6956.bigrams As you might have guessed, this doesn't work, although running this command[1] in a shell produces the result wanted. What's wrong, and how do I fix it? [1] find /usr/src-main/ -path '/*/.svn' -prune -or -print -c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?qd27v5x787.ln2>