From nobody Thu Dec 21 23:42:01 2023 X-Original-To: dev-commits-src-main@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 4Sx6Qy1X5pz54QkK; Thu, 21 Dec 2023 23:42:02 +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 4Sx6Qy0glrz4c7t; Thu, 21 Dec 2023 23:42:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703202122; 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=KoQY8myvm3TfJmGzGdhslq1+CMKx5wOSgE7EoqyHxS4=; b=OUZa/Fa5yj56fslM2x/MvewhjACFrguoQMGyyC7UP3pksauUhUw1DCjUXkcIr4SUTX04Hd Mo93oVxXq+gxH8PQvhuMfKYwXO38lChTaOgrQKz3Ov98k5aTyR+L07DHbBpDL7WKeZx7nu TS2uFWMtgjzt+D+KO2pZ3rMlOUY3Qgey69D45TBp+FLWmrg14SDtkXYa6pvD7Wxo51gTHb 6FeQyNfUv4OjGlA5dgoKe0FLyKfkooD+HBwnSYW/SfM0cIrc1TkVeXt64HjrYMgQ5nQqZK pfdC5VQIzn97O/DHKE6cbKHa5GofLZpmJwiEz+0NCcvRnNeXIbYPbhIrZSRigQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703202122; a=rsa-sha256; cv=none; b=VQSUSmwTb7oeFdRWiJwnVKiUoz4fDjLCELcgs/oOOBtGjQrZKTfhQr3jXbFel+TMKjvzDS qJ1H9kxQFJ8nSZQN8e4opFpzKeA0XejUjnJHM9h/IVMBBkrMSVOpN+VrqIi8ZhqdiNHyQq 9UDTDLM/3/qzyM4VeODaH9dqcJ8IDbEtTCpmyd6w0Ihspj2FzK9FeQp2Ziz93SFk0dBr+h 6dFAKLp5e1P7FNht7MuLG2+kfR16FCC+lzmgQ3RXdpY2gOXzlnh3widJPz1IuwAHUObMcL LT5SirJcaiG3h8FbSfX9Lphrf5/NFD+7QVyCRF/PjATJEh3eRgto7COo3kx0Kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703202122; 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=KoQY8myvm3TfJmGzGdhslq1+CMKx5wOSgE7EoqyHxS4=; b=R1NNX+rv8TPK1v15xb/wivFLMS6tBDcwFSLl3sySjzdCEbEhY4pnR5ReGfkWRNtY49ZcJ5 tUwW5egJV4y/kS5kI4R25ImI9Adwh4XUSVQNs9d2BFImxX577jQiJ6SokVEYHgJPsgJmFR lF3xVp6xpstOsqaYM8R8rEJsqYUVvh3pYbEahyWPhVXmndhIE/Y1uEynHaYo8cuT1ZwDfm uyEWHyHVwJGqyaG4yGjgBae61aK3Hq77Zq6OKyl5v3VGwTtOixPO8XGous0dUMg1/6aL1J EZls8l67YRgIptIQ7dabkWsN8VKq9+Nw9HI4W+UKtJNVvrpXQd0HhZqUmGRwhw== 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 4Sx6Qx6gymztJD; Thu, 21 Dec 2023 23:42:01 +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 3BLNg1OW085572; Thu, 21 Dec 2023 23:42:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BLNg1vg085569; Thu, 21 Dec 2023 23:42:01 GMT (envelope-from git) Date: Thu, 21 Dec 2023 23:42:01 GMT Message-Id: <202312212342.3BLNg1vg085569@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 45438f9c8b5b - main - find: Add a warning about -delete. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 45438f9c8b5b91ebf5606b4a98e891559913d25b Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=45438f9c8b5b91ebf5606b4a98e891559913d25b commit 45438f9c8b5b91ebf5606b4a98e891559913d25b Author: Dag-Erling Smørgrav AuthorDate: 2023-12-21 23:41:05 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-12-21 23:41:16 +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 --- 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 80cb175c550d..de16b012ce4d 100644 --- a/usr.bin/find/find.1 +++ b/usr.bin/find/find.1 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 23, 2023 +.Dd December 22, 2023 .Dt FIND 1 .Os .Sh NAME @@ -347,6 +347,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