From owner-freebsd-questions@FreeBSD.ORG Mon Nov 17 02:45:19 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9F8B1065672 for ; Mon, 17 Nov 2008 02:45:19 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 857018FC0A for ; Mon, 17 Nov 2008 02:45:19 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1L1u70-0002ah-3h for freebsd-questions@freebsd.org; Mon, 17 Nov 2008 02:45:14 +0000 Received: from 77.22.115.66 ([77.22.115.66]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 17 Nov 2008 02:45:14 +0000 Received: from ino-news by 77.22.115.66 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 17 Nov 2008 02:45:14 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: clemens fischer Date: Mon, 17 Nov 2008 03:44:42 +0100 Lines: 36 Message-ID: X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 77.22.115.66 X-Archive: encrypt=none User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/8.0-CURRENT (i386)) Sender: news Subject: locate: how to prune .svn directories? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2008 02:45:19 -0000 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