From nobody Wed Jan 17 18:28:35 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 4TFZBr0wDLz56P0M; Wed, 17 Jan 2024 18:28:36 +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 4TFZBq543bz4cLr; Wed, 17 Jan 2024 18:28:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705516115; 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=icm6lLt8alUn4/AGfzSjC5+eSUwsooQe8CZ6GKDAGvM=; b=G+aqNV0ofvnj4Ytrf6jrZa4Qi/8ZQP/wf5MI/DklegS+dGv46pCpYK0Fduq+XbA4dqHIP4 5xH2DrYGSUdBgV9vgeIdPWxs1+E0E9N9CH7my4eHunjB6DEonoVjjfoQyPsnx2/dClu42A 2Suvu8hnyeLLxGgIu+VrkvAb4nMJvk+vQl+P85n/hugRlbGmvdnyEyXXOcjz63wLSDnmch Yh3bz0nKHtDthULaN7aXLX+srATjZny8i5HJZuNHnsuNIHw4fx71dOT8LgySUYvfR4Oft2 Zg7uoF4DdlgrjoJXK81kZKLk+mjiq8CouwM1wY8JVyc6a2fq5zJVyYLqlictHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705516115; 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=icm6lLt8alUn4/AGfzSjC5+eSUwsooQe8CZ6GKDAGvM=; b=cqVTIZt5F6MoA0F6vvySrKGC2oZY2a1vFoDhuSY/OPSAyqOW2YyEkgMLrQFXgpAYLo5nDf GhmM4JKbEDahMXIYjGu1AYofi6UbDUik9bziIUY4blT/E+Hx4xyjwAi6P2V3xKEz8inp5g Eu0Oscs3DHY97Rsd7B+53gvq5ES9D9mks7oHOizOfhgmgatbGzV9qP7Z/Zad4lfD9P1ESb QcbdbbP0vInM5/SfDX6WoJPStygcSU2gQnsZtS5Mo1FQK1SltqZWPbjUieZU4AEJWwoaH8 S/1+PRDkClSJ1Jg7vKvkjT/x3dVrx8grmytfLMKY/5zMeGggxArpqbhqRhp2Og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705516115; a=rsa-sha256; cv=none; b=Ys9mNFVpvCu2ytCAsEgqSLtOExan83OaMFFA29ZV42RvT7+29p3S9b7/DcFrQj5bl9Daly WjHS4s2IkiGN2Iv6OvjcAiR2fum1tiPZmW7YtKwdFNk7pDj+MsowEHiBze2rqRoBEbkN+g dp2whNNk5Ec+l7spcpc7dN4pr8sAY1LtXx0kGpoqiy7EpTtPbFzqbMmtpkDG8xYvvMcWrp rbG02RKrFl/UBRVt+UQtJHHkEa/o/4OMRgINFpf0sk0g7a6H5bgJ7fyLnKvfR0EHkqldYw 681s1zPU1WguyYv/69O0jYKpnkT1S5c9nGH4oeCM7nj2SdiMELq2gVuOzvR5ww== 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 4TFZBq49zYzZnB; Wed, 17 Jan 2024 18:28:35 +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 40HISZTa063480; Wed, 17 Jan 2024 18:28:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40HISZjG063477; Wed, 17 Jan 2024 18:28:35 GMT (envelope-from git) Date: Wed, 17 Jan 2024 18:28:35 GMT Message-Id: <202401171828.40HISZjG063477@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: 2ba859e1996a - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 2ba859e1996a59a7ee9bed6871556c8f9fa8c57a Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2ba859e1996a59a7ee9bed6871556c8f9fa8c57a commit 2ba859e1996a59a7ee9bed6871556c8f9fa8c57a Author: Dag-Erling Smørgrav AuthorDate: 2023-12-21 23:41:05 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-01-17 18:28:22 +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