- Linux Shell Scripting Cookbook(Third Edition)
- Clif Flynt Sarath Lakshman Shantanu Tushar
- 35字
- 2021-07-09 19:46:15
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