From nobody Wed Jan 17 18:28:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TFZBs53qvz56P4k; Wed, 17 Jan 2024 18:28:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TFZBs3GQsz4cPG; Wed, 17 Jan 2024 18:28:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705516117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=js/1+f2g0OnOQPFitjrCzRvkFMUYam6JrmPnZFymh3s=; b=T17rx++wzcJOOE3CTI+/Dd1YJe9W7MpYNrZSuIJkIAMiut0ImBINEz2griD2RLWNzOkasB NxoGjwk4SuPo65jcqzJHL9/EP5VD0ogl4vy/tbZhYnioIn3ElHuA2ykdy/I3mXOiLRMznO I8pBy9MSaLR8g/1PMeLWVanU6FcepIBJvtPduhX3iXW64t4bjQf1ouZuqEk7/G8sumEM9S EkYIFt8l4us3ENqpN/UG/YD0ztZtT9VGYM7NAjQXVtSvePXyXa3cznl1UAXPba+JWBg7OD T+4BUwFErzvaB3QgKowFAAuk1DOzvwOuPeu/z1mCMyafUpwckabNAfq8eYQcMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705516117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=js/1+f2g0OnOQPFitjrCzRvkFMUYam6JrmPnZFymh3s=; b=GGKnZxWxvEvfUuFOll4ck6uLR2AQEiPE8CCgMTFtoiCwDSdwTzbTfR6fK7Z1SC1TE/X5qG Dn5qQU91N1KJGX7/sXholatglExSvCkKhA2m0lGfJWrahxDKrL6ZT0MBh28vdoJwlJKWju Q7YhT4KZpMT9MTfSGQCjObWSpehzyvurQ0D1EHSs/VOXX8mZ5TEUFPRk34rQM0EfVZHDtR 5ceFmq1DTjdpy7oWEXO6QzS9msznvOND0+JbD8aBPFgXp+K3u8SekwQ5lsCU+OoXQZpe64 /L4auQEWMLeFqdBHqgd1drRYJewsblBaZTRmZiY3xnHJ2iJPXVpfogI8gvUdww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705516117; a=rsa-sha256; cv=none; b=C95LO6NxYSsSC4AjQyDt3o8ofwBu19tOJgoGBz3P+Qch5OA0pNQaoA6TdcbNfDSKeVaTay D/wuTxFFwONDbuDCpI8x5HjBQ+KfReACs41SsQOXNMoupYwPTfN2AxoFycwUew1b756qIz xKY0w/pFIUI2wucMdyuX7BCay+dHxGlfbBbuP0fzvMfUjNJB/nLy4iPukI0tdbxZXRPZil UXivkdSEfwZRRK3vuI2bwuzWvLVPVGKeGr/vG7YNI7qHfZUg1Z24ur1q6RalxI5rfuwQz6 KZV0UYArG23ZBdufDH94tCyqMGLXfzctnd6f6mM4dsmqietHv5HYzRTPm3uxLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TFZBs2MXJzZnD; Wed, 17 Jan 2024 18:28:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40HISb1q063633; Wed, 17 Jan 2024 18:28:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40HISbKa063630; Wed, 17 Jan 2024 18:28:37 GMT (envelope-from git) Date: Wed, 17 Jan 2024 18:28:37 GMT Message-Id: <202401171828.40HISbKa063630@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 282a377c0926 - stable/13 - find: Add a warning about -delete. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 282a377c0926cd39fe37bd7842155ae4e13aaac0 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=282a377c0926cd39fe37bd7842155ae4e13aaac0 commit 282a377c0926cd39fe37bd7842155ae4e13aaac0 Author: Dag-Erling Smørgrav AuthorDate: 2023-12-21 23:41:05 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-01-17 16:16:00 +0000 find: Add a warning about -delete. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: pauamma_gundo.com Differential Revision: https://reviews.freebsd.org/D43162 (cherry picked from commit 45438f9c8b5b91ebf5606b4a98e891559913d25b) --- usr.bin/find/find.1 | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/usr.bin/find/find.1 b/usr.bin/find/find.1 index 5f559a12ec50..afa4c7ab8215 100644 --- a/usr.bin/find/find.1 +++ b/usr.bin/find/find.1 @@ -30,7 +30,7 @@ .\" .\" @(#)find.1 8.7 (Berkeley) 5/9/95 .\" -.Dd January 23, 2023 +.Dd December 22, 2023 .Dt FIND 1 .Os .Sh NAME @@ -349,6 +349,22 @@ The .Ic -delete primary will fail to delete a directory if it is not empty. Following symlinks is incompatible with this option. +.Pp +.Em WARNING : +The +.Ic -delete +primary will immediately attempt to delete the current path when +evaluated. +Be mindful of its place in the expression; as a general rule, it +should almost always come last. +If in doubt, try running with +.Ic -print +in place of +.Ic -delete +first. +See +.Sx OPERATORS +below for additional information on the order of evaluation. .It Ic -depth Always true; same as the non-portable