Find: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 12: Line 12:


==Control Descend Depth==
==Control Descend Depth==
The upper and lower limit of the descend depth can be controlled with -mindepth and -maxdepth, as follows:
<pre>
find . -mindepth n
</pre>
Configure find to apply tests and action at levels equal or deeper than n.  -mindepth 1 processes all but the command line arguments.


<pre>
<pre>

Revision as of 03:53, 16 December 2016

Internal

Usage

Case Insensitive Search

find . -iname ...

Control Descend Depth

The upper and lower limit of the descend depth can be controlled with -mindepth and -maxdepth, as follows:

find . -mindepth n

Configure find to apply tests and action at levels equal or deeper than n. -mindepth 1 processes all but the command line arguments.

find . -maxdepth n

Configure find to descend at most n directory levels below the command line arguments. -maxdepth 0 limits the whole search to the command line arguments.

Time Constraints

Find all files modified less that 2 days ago

find . -mtime -2