Jul 092008


This document provides several examples of using the find command in a UNIX environment.

Finding Groups with Numeric Values

# find /db? -group 15 | xargs chgrp

Often a user or system administrator will encounter directories that have a numeric value. This is an indication a change user made to /etc/groups. The following two examples use the find command to look for any groups with a value of 15. When the find command locates one of these directories, it pipes it to the chgrp command using xargs to modify the numbered directory to dba. The only difference with the two examples is the starting directories:

# find /u[0,1]?/app/oradata -group 15 | xargs chgrp dba