Consultor Eletrônico



Kbase P81337: How to locate an O/S file using the UNIX find command?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/10/2008
Status: Unverified

GOAL:

How to locate an O/S file using the UNIX find command?

GOAL:

What is the syntax of the UNIX O/S find command?

FIX:

The UNIX O/S find command utility recursively descends the directory hierarchy for each path seeking files that match a Boolean expression.

command: find <starting directory> -name <file name> <actions>

The <starting directory> is the set of directories where the find utility should start looking for the file. By default the find utility searches for all directories underneath the listed starting directory. Thus, specifying root( / ) as the starting directory the entire file system would be searched.

The <actions> option tells the find utility what to do with each file it locates that matches all the specified criteria. The specified criteria for above syntax is the name of the file being searched. The print option displays the pathname of the matching file.