Next: Adding Tests, Previous: Run Commands, Up: Actions
Delete files or directories; true if removal succeeded. If the removal failed, an error message is issued.
The use of the ‘-delete’ action on the command line automatically turns on the ‘-depth’ option (see find Expressions). This can be surprising if you were previously just testing with ‘-print’, so it is usually best to remember to use ‘-depth’ explicitly.
If ‘-delete’ fails,
find
's exit status will be nonzero (when it eventually exits).