diff options
author | 2019-08-23 12:48:14 +0000 | |
---|---|---|
committer | 2019-08-23 12:48:14 +0000 | |
commit | 5acc57b5039e20d2347de9a4eea02e57576bb700 (patch) | |
tree | 066e338651cbcfe0375b6151a3a80db03ffafb5e | |
parent | document X509_get1_email(3), X509_get1_ocsp(3), X509_email_free(3) (diff) | |
download | wireguard-openbsd-5acc57b5039e20d2347de9a4eea02e57576bb700.tar.xz wireguard-openbsd-5acc57b5039e20d2347de9a4eea02e57576bb700.zip |
Use -delete in EXAMPLES
-delete is part of POSIX since 2001 and tedu added support for it in 2012,
-print0 however never made it into any standard, so replace this less
portable idiom with its more concise built-in counterpart.
Both -print0 as well as xargs(1) -0 explain and reference each other and
CAVEATS goes into detail with problematic file names, so no information
is lost by replacing this particular example.
While here, make the -exec example rm(1) multiple files at once.
Feedback from claudio tb
Input and OK millert
-rw-r--r-- | usr.bin/find/find.1 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/find/find.1 b/usr.bin/find/find.1 index a930b4edefc..fb8385291f7 100644 --- a/usr.bin/find/find.1 +++ b/usr.bin/find/find.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: find.1,v 1.96 2018/12/06 17:45:14 tedu Exp $ +.\" $OpenBSD: find.1,v 1.97 2019/08/23 12:48:14 kn Exp $ .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -31,7 +31,7 @@ .\" .\" from: @(#)find.1 8.1 (Berkeley) 6/6/93 .\" -.Dd $Mdocdate: December 6 2018 $ +.Dd $Mdocdate: August 23 2019 $ .Dt FIND 1 .Os .Sh NAME @@ -581,9 +581,9 @@ ending in a dot and single digit, but skip directory Find and remove all *.jpg and *.gif files under the current working directory: .Pp -.Dl "$ find . \e( -name \e*.jpg -o -name \e*.gif \e) -exec rm {} \e;" +.Dl "$ find . \e( -name \e*.jpg -o -name \e*.gif \e) -exec rm {} +" or -.Dl "$ find . \e( -name \e*.jpg -o -name \e*.gif \e) -print0 | xargs -0r rm" +.Dl "$ find . \e( -name \e*.jpg -o -name \e*.gif \e) -delete" .Sh SEE ALSO .Xr chflags 1 , .Xr chmod 1 , |