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.
--
M=E1rio Gamito
Administra=E7=E3o de sistemas e desenvolvimento
Netual - Multim=E9dia e Telecomunica=E7=F5es, Lda.
Rua Jo=E3o Afonso, N=BA1
3800-198 Aveiro - Portugal
Tel. +351 234 371 431 / Fax. +351 234 371 438
E-mail: gamito [at] netual.pt
www.netual.pt
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Deleting multiple directories with the same name
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
On Fri, Jan 21, 2005 at 07:33:54PM +0000, M=E1rio Gamito wrote:
> 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 conten=
ts,
> 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.
> --
> M=E1rio Gamito
> Administra=E7=E3o de sistemas e desenvolvimento
> Netual - Multim=E9dia e Telecomunica=E7=F5es, Lda.
> Rua Jo=E3o Afonso, N=BA1
> 3800-198 Aveiro - Portugal
> Tel. +351 234 371 431 / Fax. +351 234 371 438
> E-mail: gamito [at] netual.pt
> www.netual.pt
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin=
" in
> the body of a message to majordomo [at] vger.kernel.org
> 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 majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Deleting multiple directories with the same name
--IS0zKkzwUGydFO0o
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
0n Fri, Jan 21, 2005 at 10:31:44PM +0200, urgrue wrote:
> find some/path -type d -name CVS | xargs rm -r
Coul be: 'find some/path -type d -name CVS -exec rm -r {} \;'
--
Ricardo Catalinas Jimenez Madrid, Spain.
th1nk3r(at)server01(dot)org http://www.server01.org
GnuPG Key fingerprint =3D 662C EBF7 9220 0F14 C644 F90B DC3E A163 7F8D CDAE
--IS0zKkzwUGydFO0o
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFB8i2e3D6hY3+Nza4RAoarAKCM0WssT3D9mkbOWldPCN89+8c5EQCg hwHN
iSCV3W0EViVW5AzZaGRpoAo=
=CNUI
-----END PGP SIGNATURE-----
--IS0zKkzwUGydFO0o--
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html