Looking for files older than n number of days?

Dan Nelson dnelson at allantgroup.com
Mon Jun 6 14:33:57 GMT 2005

In the last episode (Jun 06), Francisco Reyes said:
> On Mon, 6 Jun 2005, Dan Nelson wrote:
> >    The primaries may be combined using the following operators. 
> >    The operators are listed in order of decreasing precedence.
> >[...]
> >    expression -and expression
> >    expression expression
> >         The -and operator is the logical AND operator.  As it is
> >         implied by the juxtaposition of two expressions it does not
> >         have to be specified.  The expression evaluates to true if
> >         both expressions are true.  The second expression is not
> >         evaluated if the first expression is false.
> Does that mean that "-ls" always evaluates to false?

Nope; "find . -ls -ls"  will print every filename twice.  You might
want to list every filename for logging purposes, then do some other
processing (-delete maybe, or something called via -exec) on certain
other conditions.  More manpage pasting:

     -ls     This primary always evaluates to true.  The following
             information for the current file is written to standard
             output: its inode number, size in 512-byte blocks, file
             permissions, number of hard links, owner, group, size in
             bytes, last modification time, and pathname.

	Dan Nelson
	dnelson at allantgroup.com

More information about the freebsd-questions mailing list