home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    


find (\&







Works like the Unix find command; traverses the specified directories, looking for files that match the expressions or actions you specify in a subroutine called wanted , which you must define. For example, to print out the names of all executable files, you could define wanted this way:

sub wanted {
    print "$File::Find::name\n" if -x;
Provides the following variables:


Current directory name ( $_ has the current filename in that directory).


Contains "$File::Find::dir/$_" . You are chdir ed to $File::Find::dir when find is called.


If true, find does not descend into any directories.


Set this variable if you're using the Andrew File System (AFS).