Linux / Unix: Find And Remove Files With One Command On Fly

Originally published at: https://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/

I am new to Unix and Linux command line. How do I find and delete all files (say all ‘*.bak’) under Linux / UNIX-like operating systems using a shell prompt?

find / -name "*.bak"  -print -delete

Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki