I'm trying to remove all .html files from the directory generated
and from all subfolders there but it needs to leave all other files and directories alone.
I tried going through folder by folder and running rm *.html
but this takes a long time as there are 20+ subfolders which also have subfolders. I tried looking the man pages for rm
but nothing obvious jumped out. I'm sure there's a way to do this in one shot but I don't know how. Any ideas?
我认为这可行:
cd generated
find . -type f -iname "*.html" -delete
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.