Enter the myfind directory and run make .
This is the typical usecase :
./myfind [starting-point...] [expressions]
-print :
prints the path of the currently examined file. It always returns true
-name : takes a pattern as parameter and returns true if the current filename matches the parameter.
You must handle globbing
-type : takes a parameter and returns true if the type of the current file matches the parameter. You
must handle the following types:
• b: special files in block mode
• c: special files in character mode
• d: directories
• f: regular files
• l: symbolic links
• p: named pipes (FIFO)
• s: sockets
-newer : takes a file as parameter and returns true if the currently-examined file has a last modification
date more recent than the file given as argument
-perm : takes a mode in octal as parameter and returns true if the current file’s permission bits match
exactly the mode. | works with - and /
-user : takes a username and returns true if the file is owned by the user username.
-group : takes a groupname and returns true if the file belongs to the group groupname
-delete: deletes files and returns true if it succeeded. If the deletion fails, an error message is dis-
played.
!!! BE CAREFULL WHEN USING THIS OPTION AS THE CODE MIGHT HAVE SOME BUGS IN IT !!!
-a : represents the and operator
-o : represents the or operator
! : represents the not operator