Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
NAME pfind - a simplified version of `find' SYNOPSIS pfind [path] [ -name <expression>] [ -type <c>] DESCRIPTION This simplified version of the find command. It accepts three optional arguments; path, expression and type. Exactly one starting directory must be specified. Each option may be specified in its long form, with either a single or double dash, or in its short form, which consists of a single dash and the first character of the flag name. A long option may take a parameter, of the form --arg=param or --arg param. If any a flag appears more than once pfind prints a syntax error to standard error. EXAMPLE Recursively search the directory `/home/s/smith' for a file named `core' of any type. $ pfind /home/s/smith -name core Recursively search the current working directory for a regular file with a name ending in `.c'. $ pfind . -name \*.c -type f Print the path for all files and subdirectories. It does not stop until it has searched all subdirectories. $ pfind cscie215/hw BUGS Since this simplified version of find uses getopt to parse options in the command line, the errors that are printed for invalid or missing flags differ from that of GNU find. For example, pfind will print: pfind: option `-name' requires an argument to stderr, while find will print: find: missing argument to `-name' The searchdir and checkFile functions exceed the maximum function length of 30 lines by 33 and 11 lines each. The error handling for the access function on line 224 does not check errno. Instead it assumes if an error occurred it was a permission error. CREDIT Philip Molloy