Linux Shell Scripting Cookbook(Third Edition)
上QQ阅读APP看书,第一时间看更新

Deleting based on file matches

The find command's -delete flag removes files that are matched instead of displaying them. Remove the .swp files from the current directory:

$ find . -type f -name "*.swp" -delete