summaryrefslogtreecommitdiffstats
path: root/usr.bin/find
Commit message (Collapse)AuthorAgeFilesLines
* Calls one or more of malloc(), warn(), err(), syslog(), execlp() ordes1998-10-131-2/+2
| | | | | | | | | | | execvp() in the child branch of a vfork(). Changed to use fork() instead. Some of these (mv, find, apply, xargs) might benefit greatly from being rewritten to use vfork() properly. PR: Loosely related to bin/8252 Approved by: jkh and bde
* PR: 7522thepish1998-08-101-1/+1
| | | | | Correct bug in the inverse operator optimisation code which caused segv on ! without a following expression.
* Fixed printf format errors.bde1998-07-061-1/+1
|
* Make sure we pass the length - 1 to readlink, since it adds its ownimp1998-06-091-1/+1
| | | | | | NUL at the end of the path. Inspired by: OpenBSD's changes in this area by theo de raadt
* Add cross references for find(1), locate(1), whereis(1) and which(1).jkoshy1998-05-151-1/+3
| | | | | Submitted by: Josh Gillam <josh@quick.net> PR: docs/6642
* Removed definition of _NEW_VFSCONF. The new vfsconf interface is nowbde1998-01-201-1/+0
| | | | the default.
* A partial frontal lobotomy for find if using the NetBSD libc whichjb1998-01-103-1/+12
| | | | | | | | | doesn't know about getvfsbyname() and the vfsconf structure. This disables the -fstype option if compiled with a pre-processor that defines __NetBSD__. With the FreeBSD built pre-processor, find can only be built with the FreeBSD libc. So when running with a NetBSD kernel, FreeBSD's libc will have to return ENOSYS for things that NetBSD doesn't support. That's life in a hybrid world.
* Sort option list so that -amin works.steve1997-11-281-1/+5
| | | | | PR: 5171 Submitted by: Dmitrij Tejblum <tejblum@arc.hq.cti.ru>
* Better wording explaining that all single character optionssteve1997-10-271-1/+10
| | | | | | are extensions along with the previous list of primaries. Suggested by: bde
* Offending statement removed from STANDARDS section. From what Isteve1997-10-271-14/+1
| | | | | | | can gather from the Posix spec that I have (which is very old) all one character options are extensions to Posix. PR: docs/4701
* Add the primaries -mmin, -amin, -cmin to find, similar to the GNU find.wosch1997-10-135-3/+128
|
* Add -execdir which will execute the exec command in the dir of the fileimp1997-08-295-5/+117
| | | | | | | in question. This change and the fts changes should be merged into 2.2-stable as soon as they are vetted in -current. This should allow cleaning of files in /tmp to be reneabled. Obtained from: OpenBSD
* Eliminate a variable that is set but never used.jdp1997-05-191-5/+4
|
* Mention that "-P" is the default.jdp1997-05-191-1/+2
|
* `it's'' -> `its'' where appropriate and typo fixes in time2posix.3.eivind1997-05-191-2/+2
| | | | | | Closes PR docs/3612. Submitted by: Josh Gilliam <soil@quick.net>
* Minor typo.max1997-05-021-2/+2
| | | | | PR: 3472 Submitted by: Josh Gilliam <soil@quick.net>
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-291-1/+1
| | | | posix standard on the topic.
* Fix "-fstype local" that was broken by another bugfix in the Lite2 merge.peter1997-03-271-5/+5
| | | | Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>, PR#3076
* Merge from Lite2 - use new getvfsbyname() and related changes.peter1997-03-115-58/+59
| | | | understand whiteouts (FTS_W from fts()).
* Fix a gross bug in the ! operator optimization code. The followingjoerg1997-03-101-1/+7
| | | | | | | | kind of expressions caused a dereferencation of an uninitialized malloc area, yielding wrong expression evaluation at best, and core dumps at worst (malloc.conf -> AJ): find ... ! \( expr1 ! expr2 \) ...
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* The option "fstype" does not handle the argument "msdos" correctly.wosch1997-01-281-7/+4
| | | | | | | | This error results from changing the name for the msdos file system from "pcfs" to "msdos". Close PR #1105 submitted by: Thomas Wintergerst <thomas@lemur.nord.de>, Slaven Rezic <eserte@cs.tu-berlin.de>
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* With -delete, don't complain about non-empty directories. Otherwisepeter1996-10-051-1/+1
| | | | "cd /tmp; find . -mtime +7 -delete" is excessively noisy.
* For the -delete option, emulate the behavior of "rm -f" when dealing withpeter1996-10-051-0/+7
| | | | | | user-immutable files. Requested by: ache
* Implement a -delete option to find. The code is extremely paranoid andpeter1996-10-045-2/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | goes to a fair degree of trouble to enable something like this to be safe: cd /tmp && find . -mtime +7 -delete It removes both files and directories. It does not attempt to remove immutable files (an earlier version I showed to a few people did a chflags and tried to blow away even immutable files. Too risky..) It is thought to be safe because it forces the fts(3) driven descent to only do "minimal risk" stuff. specifically, -follow is disabled, it does checking to see that it chdir'ed to the directory it thought it was going to, it will *not* pass a pathname with a '/' character in it to unlink(), so it should be totally immune to symlink tree races. If it runs into something "fishy", it bails out rather than blunder ahead.. It's better to do that if somebody is trying to compromise security rather than risk giving them an opportunity. Since the unlink()/rmdir() is being called from within the current working directory during the tree descent, there are no fork/exec overheads or races. As a side effect of this paranoia, you cannot do a "find /somewhere/dir -delete", as the last argument to rmdir() is "/somewhere/dir", and the checking won't allow it. Besides, one would use rm -rf for that case anyway. :-) Reviewed by: pst (some time ago, but I've removed the immutable file deletion code that he complained about since he last saw it)
* [HISTORY] command appeared in Version 1 AT&T UNIXwosch1996-08-291-0/+6
| | | | Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41
* Localize itache1996-08-122-3/+5
|
* Use strtoq() instead of strtol() so that large inums, and sizes can bebde1996-04-071-4/+4
| | | | | | | specified. Not fixed: specification of large uids and gids; silent truncation of unrepresentable values.
* Don't use printf() for simple strings because it is slow. Closes PR 783.wollman1995-10-161-1/+1
| | | | Submitted by: Wolfram Schneider <wosch@freebsd.first.gmd.de>
* Simpler fix to the find bug reported by Terry Lambert <terry@lambert.org>nate1995-09-121-0/+3
| | | | | | | [ Find to a file vs. to stdout ] produces different output because find does not flush stdout when doing a -print. Submitted by: Jeffrey Hsu <hsu@freefall.freebsd.org>
* Delete bogus referneces to timezone code internal header file `tzfile.h',wollman1995-08-072-7/+5
| | | | which is no longer bogusly installed in /usr/include.
* Remove trailing whitespace.rgrimes1995-05-305-88/+88
|
* Add GNU-style `-print0' primary. This exists so that one can safelywollman1995-05-095-4/+39
| | | | | do `find some-nasty-expression -print0 | perl -n0e unlink' and have all the files actuallly get deleted. (Using `xargs' and `rm' is not safe.)
* Fix completely broken find behaviour:guido1995-02-271-0/+7
| | | | | | | a find -foo -o -bar would behave like find -bar. The same for -a This broke (among others) ./etc/security. Obtained from: NetBSD
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-2711-0/+2724
OpenPOWER on IntegriCloud