be me, junior sysadmin, 3am told to delete the *.tmp files in a staging directory write
find . -delete -name '*.tmp'looks fine it is not fine find evaluates the expression left to right-deleteis true for every file it sees, so it deletes everything before-namegets a vote staging directory is now very clean very, very clean restore from backup, which exists only because an older guy insisted on it never touch prod before coffee again
The correct version is find . -name '*.tmp' -delete. Test with -print first. Always -print first.