Deleting multiple directories with the same name
Hi,
I have this huge directory tree.
Each branch has a "CVS" directory, that i now want to delete.
How can i delete recursevely all the "CVS" directories and its contents, but not the other files ?
I've squeezed my head with find piping to xargs, but i always end up deleting everything :-(
Any help would be apreciated.
Warm Regards.
Signature · 12 lines
Mário Gamito Administração de sistemas e desenvolvimento Netual - Multimédia e Telecomunicações, Lda. Rua João Afonso, Nº1 3800-198 Aveiro - Portugal Tel. +351 234 371 431 / Fax. +351 234 371 438 E-mail: [email protected] www.netual.pt - To unsubscribe from this list: send the line "unsubscribe linux-admin" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
one option:
rm -r */*/CVS
would delete all occurences of anything/anything/CVS another way:
find some/path -type d -name CVS | xargs rm -r
Quoted 8 lines · Mário Gamito
Hi,
I have this huge directory tree.
Each branch has a "CVS" directory, that i now want to delete.How can i delete recursevely all the "CVS" directories and its contents, but not the other files ?
Quoted 20 lines
I've squeezed my head with find piping to xargs, but i always end up deleting everything :-(
Any help would be apreciated.
Warm Regards.
Signature · 12 lines
Mário Gamito Administração de sistemas e desenvolvimento Netual - Multimédia e Telecomunicações, Lda. Rua João Afonso, Nº1 3800-198 Aveiro - Portugal Tel. +351 234 371 431 / Fax. +351 234 371 438 E-mail: [email protected] www.netual.pt - To unsubscribe from this list: send the line "unsubscribe linux-admin" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 1 line · urgrue
find some/path -type d -name CVS | xargs rm -r
Coul be: 'find some/path -type d -name CVS -exec rm -r {} \;'
Signature · 3 lines
Ricardo Catalinas Jimenez Madrid, Spain. th1nk3r(at)server01(dot)org http://www.server01.org GnuPG Key fingerprint = 662C EBF7 9220 0F14 C644 F90B DC3E A163 7F8D CDAE