Find all core dump files:
- find . -type f -regex “.*/core.[0-9][0-9][0-9][0-9]$”
The regex in the above command matches the file name “core.xxxx” where “xxxx” is exactly four numbers 0-9. If the results look correct, we can delete all those dump files with the following command.
Find and delete all core dump files:
- find . -type f -regex “.*/core.[0-9][0-9][0-9][0-9]$” -exec rm ;