Find files


Searching for files with specific attributes.

To search for specific attributes you must enter a string pattern, which specifies which attributes are searched for, and if they should be enabled or disabled. Single attribute is represented with the following format:

<attribute>+ or <attribute>-

The plus sign means that the file must have that attribute set, minus sign means that the file must not have that attribute set.

The various <attribute> identifiers are as follows:

Windows:

File attributes:
r - read only
a - archive
h - hidden
s - system
d - directory
l - symlink
t - temporary
p - sparse
c - compressed
e - encrypted

Unix:

Permissions:File types:
ur - user read
uw - user write
ux - user execute
gr - group read
gw - group write
gx - group execute
or - others read
ow - others write
ox - others execute
us - set user ID
gs - set group ID
sb - sticky bit
b - block
c - character
d - directory
f - fifo
l - symlink
r - regular
s - socket

On Unix you may also use octal representation of permissions. For example 0750 is the same as ur, uw, ux, gr and gx combined.

Advanced patterns.

Several attributes may be combined together with an AND relationship. Just specify one pattern after another. For example: r+s+h+ matches files that have all three: read-only, hidden and system attributes set.

Furthermore, such groups of AND attributes may be combined together with an OR relationship. This is done by using the "|" character (vertical bar). For example: r+|s+h+ matches files that have either:

  • read-only attribute set
  • or
  • both hidden and system attributes set.
  • It is possible to negate AND sequences using "!" character specified at the start of the sequence. For example: !r+s+h+ matches files that don't have all three: read-only, hidden and system attributes set. The matched file may have none, one or more of those attributes set, but not all of them. Negation only applies to AND sequences, thus pattern !r+|!s+h+ matches files that either:

  • don't have read-only attribute set (the same as r-)
  • or
  • don't have both hidden and system attributes set.
  • You cannot use parenthesis to separate sequences.

    Examples.


    Windows:
    a+s-h- matches files that have archive attribute set and don't have neither system nor hidden attributes set
    e+|c+ matches files that are either compressed or encrypted (these are NTFS attributes)
    d- matches files but not directories

    Unix:
    uw+|gw+|ow+ matches files that are writeable either by user, group or anybody else
    222+ matches files that are writeable by user, and by group, and by anybody else
    d+ox+ matches directories that are accessible by anybody
    !700+ matches files that are not fully accessible to the user