From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by sourceware.org (Postfix) with ESMTPS id 534DC3858407 for ; Thu, 9 Dec 2021 14:16:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 534DC3858407 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qk1-x742.google.com with SMTP id 132so4940674qkj.11 for ; Thu, 09 Dec 2021 06:16:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=apqLJ+WjJhNVhYCsqo4t2tUGijfnx1cVXtjC7udCPUM=; b=H1lPone9MFLJIY0RBZGNuEHQL1XiGz7p9MRZjc84dLrpT6YKLMQXAsA+K8k+t+XqNT HcGs8GO+LsbicdVrtr0Ko962+z9+TOE3o1/SxHItCahh7qhlaIk5Kl6vRKReGsqPT2ec tkmhcVdebkS0wOsy/8x8LGbvXn4LhshxKBerXeJvLtA2xZ6NAO5fd/PfDIXnugxkbWXO X7nLbqos0AvCbj2MR0A17pePDR0K6jLuDYt5ymx7gbaRHsnRMKAxK11paQn/5Iig2kj5 wpoZhUNDWLP+Uq/aXTCv/pFd3VIyfJFHp9amnYenZmqUpvGNjtsVInRP4bCSUvISKueY 57CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=apqLJ+WjJhNVhYCsqo4t2tUGijfnx1cVXtjC7udCPUM=; b=RV1kwzw3gV2QmDTKKnquSWtRVyGn8Dvhj/KY8aDrpRhq6HtCCyla6tx6R+JoVeTN84 N84GG95XCZFb0i8oGX4jheb4ziLc8LX0MJGzYH0/QC9GyqouRN2PTv5mAizf1kxNNeBh F1zo/hT3FGpiQzkunJEDNWZQbseOI+JwTLE+t4lqbP8k33I4ZYCm5OTzZbaRK6oDkNQM bxfQbN+Exj/mw20xatpdJPsoIt8BbBs7kLL2EzKN8/Pe7+8FGfBOYU8geTaNqJlqCmq0 gsK/eHvsey78FoLp7Q9Mn9CkCsCIjTJ+u5wLJtok3ELsURhV+Jhwb17aIZuLobAIui5Q oS+Q== X-Gm-Message-State: AOAM533RkeHYCJcm0ucArMvWB4ta06G4JkSIccBUJQS8Lp8FJ8JhkzGA lrjXnBYPvgKIARLMu0RUL+RtXNoJKwjAJ+xQKkEEfNFSQcZs6BXb2QnBig== X-Google-Smtp-Source: ABdhPJzygFXXZZAySwpsLz5SFfscMZaVYyq4JnqrQpHPg4KbuyJBNso4YQblpmiQlLpfh0By19B0FRBfjkekYYqpHpk= X-Received: by 2002:a37:a8e:: with SMTP id 136mr13673891qkk.395.1639059395493; Thu, 09 Dec 2021 06:16:35 -0800 (PST) MIME-Version: 1.0 From: Keith Christian Date: Thu, 9 Dec 2021 07:16:24 -0700 Message-ID: Subject: Help with the prunepaths option with findutils updatedb locate To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Dec 2021 14:16:37 -0000 Fellow Cygwin fans, I'm trying to keep the many directories with "OneDrive" in the pathname out of the locatedb file, as I don't care to see them in locate's output, nor bloat the locatedb file. I'd appreciate any insight into the prunepaths option for the test case below, (Line 10,) and how to tell prunepaths to ignore paths with spaces so that the paths in Lines 5 and 6 below will not be included in the locatedb file. 1. Versions: 2. updatedb (GNU findutils) 4.8.0 3. CYGWIN_NT-10.0 3.2.0(0.340/5/3) 2021-03-29 08:42 x86_64 Cygwin 4. Unfortunately, on this Windows 10 PC there are 650 unique directory paths with "OneDrive" in them, and these three are the most numerous: 5. /cygdrive/c/Users/corporatedroid/OneDrive - FoobarCorp/ 6. /home/c_users_corporatedroid/corporatedroid/OneDrive - FoobarCorp/ 7. /cygdrive/c/Users/corporatedroid/AppData/Local/Microsoft/FoobarCorp/ 8. With the one-liner below, we create a small locatedb file (/var/locatedb_prune_test) and specify that prunepaths omit the '/cygdrive/c/Users/corporatedroid/AppData/Local/Microsoft/OneDrive/ListSync' subdirectory: 9. ================================== 10. F=/var/locatedb_prune_test; echo ; updatedb --localpaths='/cygdrive/c/Users/corporatedroid/AppData/Local/Microsoft/OneDrive' --output=${F} --prunepaths='/cygdrive/c/Users/corporatedroid/AppData/Local/Microsoft/OneDrive/ListSync' ; ls -l ${F} 11. -rw-r--r-- 1 corporatedroid Domain Users 26280 Dec 9 06:22 /var/locatedb_prune_test 12. ================================== 13. Here, we see that the path ending with 'ListSync' incorrectly appears in the /var/locatedb_prune_test output despite the prunepaths option in line 10: 14. ================================== 15. F=/var/locatedb_prune_test;locate -d${F} 'ListSync'|cat -n|tail -3 16. 33 /cygdrive/c/Users/corporatedroid/AppData/Local/Microsoft/OneDrive/logs/ListSync/Business1/Nucleus-2021-12-09.1317.15440.1.odl 17. 34 /cygdrive/c/Users/corporatedroid/AppData/Local/Microsoft/OneDrive/logs/ListSync/Business1/microsoftNucleusTelemetryCache.otc 18. 35 /cygdrive/c/Users/corporatedroid/AppData/Local/Microsoft/OneDrive/logs/ListSync/Business1/telemetry-dll-ramp-value.txt 19. ================================== Any ideas appreciated.