Sample Header Ad - 728x90

How to remove similar folder from multiple locations in terminal

2 votes
2 answers
243 views
I have a folder 'reg_standard' nested within 68 different folders that I want to remove. The path to this folder looks something like: /Volumes/.../sub-???/run_?.feat/reg_standard where '?' is a stand-in for all the different folders that start with 'sub' or 'run'. For example, I have sub-101, sub-102, sub-162 (34 in total) and run_1 and run_2 folders nested within each sub-???, making a total of 68 folders in total where reg_standard exists. How can I remove this folder and all its contents efficiently? Do I use rm -r? or find ... - delete? I use MacOS. Thank you!
Asked by user556056 (23 rep)
Jan 9, 2023, 06:53 PM
Last activity: May 17, 2025, 09:07 AM