Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month at the Massachusetts Institute of Technology, in Building E51.

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hi, how to delete several files in a recursive way



Franco castro wrote:
> Hi, I need to delete all .htaccess in all folders, but we are talking about
> houndreds of folders, I need to figuer out how to "find and destroy" delete
> all those files, I'm not very good with bin bash scripting, so maybe any of
> yours know how to do it, tnks =)

How about something along the lines of:

find /path/to/base/dir -name .htaccess -exec rm -i {} \;

If you're brave, you can change the -i to -f to make it not ask you
about each and every file, but that sounds dangerous to me...

-- 
Cole Tuininga
Lead Developer
colet-KCgK2vT7wad/90uGnh1m2w at public.gmane.org






BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org