Commit Graph

71 Commits

Author SHA1 Message Date
apb
aaffb7873e Updates to the find(1) man page, based on PR 45381 from Greg Woods,
with additional changes by myself.
2011-09-24 13:45:43 +00:00
wiz
fcf318eda4 Fix typos found by Ryo HAYASAKA in PR 43857.
While here, split file systems that grew together.
2010-09-09 11:42:13 +00:00
dsl
fe39abeba9 Clarify (hopefully) the description of -remove.
Fixes PR/38987
2009-11-06 21:03:12 +00:00
joerg
63ec927bcc Use -compact + explicit .Pp instead of .sp with negative line length. 2009-10-15 02:26:38 +00:00
wiz
1ee045f360 Fix first part of PR 38987 by Robert Elz:
.Dq needs punctuation quoted to mark it up.

I leave 2) and 3) of that PR open for someone else...
2009-01-04 12:13:56 +00:00
daniel
02dcfb175e Add the '-E' option to interpret regexes as extended regexes. While we
are here, fix ordering in usage information by putting '-X' in the proper
place.

Addition of '-E' was discussed on tech-userlevel.
2007-07-19 07:49:30 +00:00
wiz
08287ce407 Remove macrobreaking whitespace. 2007-03-08 21:23:00 +00:00
perry
851b2b6abe Add a missing "can". Update date. 2007-02-08 13:32:53 +00:00
perry
bf9831bfd2 Document -rm as an alias for -delete, and document that both -delete
and -rm are extensions.
2007-02-06 15:33:21 +00:00
elad
a706fb0965 Add -delete from FreeBSD. 2007-02-06 13:25:01 +00:00
wiz
b7d64c2725 Fix typo. 2007-02-02 07:27:15 +00:00
christos
a9ee9264a7 document -xdev [from Anon Ymous] 2007-02-01 19:00:16 +00:00
apb
bfb3f336ef Document "find ... -exec ... {} +". Also make some other minor updates.
Changes initially supplied by John Hawkinson in PR 20470, but edited by me.

/msg wizd: search for ".sp"
2006-10-07 17:06:28 +00:00
apb
dbe2acacef Add some missing entries in lists, and some serial commas.
Inspired by PR 20470 from John Hawkinson.
2006-10-07 16:34:06 +00:00
uebayasi
c9ce60a1ed PR32022 - Clarify find(1) syntax documentation about parenthesized expressions
and the -f option (explicit hierarchy specifier).  From "Sander Bos, with
credits to Peter Bex".

Bump date.
2006-09-23 05:03:33 +00:00
jschauma
a32f19d465 Add a new primary '-exit n':
This primary causes find to stop traversing the filesystem and
exit immediately if a previous condition was met.  If no value is
specified, the exit value will be 0, else n.  Note that other
primaries will be evaluated and acted upon before exiting.

Ok matt@, garbled@.
2006-02-20 16:31:02 +00:00
reed
9695cc3899 Add -false switch. From man page:
-false  This primary always evaluates to false.  This can be used follow-
        ing a primary that caused the expression to be true to make the
	expression to be false.  This can be useful after using a -fprint
	primary so it can continue to the next expression (using an -or
	operator, for example).

This was brought up on the tech-userlevel list in October.

Using -fprint on findutils or new NetBSD find(1) does not do what
I wanted. For example, if saving results of all files that start
with a vowel or saving results of all files owned by group operator,
then the list of files owned by group operator would not include
the files starting with a vowel.

findutils's find has a workaround for this with -false and also a
"," comma opeator. (I made add this comma operator later; you can use
the comma to perform multiple independent tests.)
2005-11-09 00:47:16 +00:00
wiz
34cace8bd1 Bump date for previous. 2005-10-12 20:10:45 +00:00
reed
4129c05469 This adds -fprint function. The primary name "-fprint" (but not the
code) comes from findutils; it behaves the same.

From my manpage addition:

 -fprint filename
	This primary always evaluates to true.  This creates filename or
	overwrites the file if it already exists.  The file is created at
	startup.  It writes the pathname of the current file to this
	file, followed by a newline character.  The file will be empty if
	no files are matched.

Here is an example usage:

find /etc \( -name "*pass*" -fprint file1 \) -o \( -group operator -fprint file2 \) -o -name "w*"

Note that this example will NOT include entry in file2 if it is
matched in first expression. (This also is same behaviour as
findutils, and I have implemented a -false primary to handle that.
I will commit it later.)

This creates the file as command line argument parsing time.
If there is an error somewhere on that line, such as missing values
or mismatched parenthesis, then a file may still be created.
(Even if a later -fprint filename is unwritable.) This is similar
behaviour to findutils. (It has been suggested that this find could
be code to create the files in an extra stage after the command-line
argument parsing and before the actual function processing.)

I will add -fprintx and -fprint0 soon.

This was discussed on tech-userlevel.
2005-10-12 20:03:59 +00:00
mrg
3a96c9add9 add a "file" to the arguments that isn't enclosed in square brackets
making it clear that at least one file/directory argument is required
in both the manual and usage.  "find" with no args currently barfs but
these documents implied it would do something useful.
2005-08-10 06:51:24 +00:00
lukem
5d3311e08a tweak roff in previous 2004-04-19 00:28:11 +00:00
lukem
3333d5f7f7 Use "sysctl vfs.generic.fstypes" to determine the list of available fstypes. 2004-04-19 00:18:46 +00:00
wiz
e3366bb6be Bump date for previous, and sort a bit. 2004-03-31 01:46:22 +00:00
heas
a7353cbe7c Mention -type w, which is coded as a synonym for W (whitespace). 2004-03-30 22:54:04 +00:00
agc
89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
provos
ccc5fba3de Implement -iname for case insensitive matching on file names.
From freebsd/openbsd.  Approved by jaromir@, manu@, perry@.
2003-08-03 19:46:03 +00:00
wiz
fb538fbb96 Change macro usage so it works correctly with 1.19. 2003-06-26 17:46:36 +00:00
wiz
caa2d78a26 Add missing "to be". From Jim Bernard in PR 21008. 2003-04-04 19:21:21 +00:00
wiz
990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
jhawk
c3ac22a6a8 markup: the ";" for -exec, -ok, and -execdir is a seperate word from
the last argument
2003-02-23 20:01:31 +00:00
jhawk
e025cf984b Obey preceding - and + on -user when a numeric uid is specified (only).
Our behavior is now consistent with Solaris, and more useful than previous.
2003-01-30 10:49:18 +00:00
matt
3e5306bedf With -printx also qoute $ and ` (since they are shell metacharaters). 2003-01-26 07:07:31 +00:00
wiz
d6eecef728 Lose a trailing space. 2002-10-01 11:04:12 +00:00
wiz
826d3a8737 Clean up after recent changes.
Some notes:
\- is for minus signs only.
Closing braces and punctuation after a macro should definitly not be
on the next line, but at the end of the macro line, separated with spaces
from the macro argument and each other. Otherwise, unwanted whitespace
appears.
2002-09-28 12:59:49 +00:00
grant
714cd00ddf bump date for latest changes. 2002-09-28 12:34:53 +00:00
grant
2812905360 New sentence, new line and minor mdoc cleanup. 2002-09-27 16:56:53 +00:00
provos
9972ef9ff8 support for -empty, -execdir, -mindepth, -maxdepth to match other UNIX-like
systems.  based on work by tholo@openbsd.org.  approved by perry.
2002-09-27 15:56:25 +00:00
thorpej
e1ed089ecd -path is an extension -- say so. 2002-09-16 19:24:59 +00:00
ross
2a76afae02 Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:36:18 +00:00
kleink
4f0bdb5b24 Since we've already been down that road with -cnewer, support GNU find(1)'s
-anewer as well.
2001-12-02 12:46:39 +00:00
wiz
056d651038 Punctuation fix, sort SEE ALSO, sort sections, drop a .Pp. 2001-12-01 19:11:27 +00:00
wiz
aded0d2cce Whitespace cleanup. 2001-12-01 16:43:07 +00:00
kleink
e7566d6000 Add a "cnewer" primary which evaluates true if a file has a more recent
ctime than its argument.

From kre in PR bin/14802; originally suggested name was "updated" but
renamed due to GNU find(1) being prior art for this functionality.
2001-12-01 14:10:04 +00:00
abs
9819b7e8e7 space after section number in .Xr 2001-07-06 18:12:02 +00:00
kleink
a1359f90c2 -s: Replace the reference to strcmp(3) with a functional description. 2000-07-11 06:47:21 +00:00
enami
2263e83df9 Fix typo. 2000-03-16 18:56:41 +00:00
itohy
f1042d894e Add -s in usage. 2000-03-13 08:21:36 +00:00
itohy
4f844cd4ec Describe -s (sort) option.
Corrections are highly appreciated.
2000-03-10 11:49:14 +00:00
kleink
13ca730983 Mention -iregex and -regex primaries being non-standard extensions. 1999-07-20 09:02:24 +00:00
cgd
91ff0a1b87 add -regex and -iregex primaries which, like GNU find's primaries of the
same name, match files' entire paths against regular expressions.
-regex is case sensitive, -iregex is case-insensitive.  Note that these
primaries are _not_ entirely compatible with the GNU find primaries,
because their BREs appear to support alternation with \| whereas our BREs
do not.  Also note there are no primaries which provide extended regular
expressions matching, though if they are desired they would be trivial
to implement.
1999-07-20 01:28:41 +00:00