* Deleting multiple directories with the same name
@ 2005-01-21 19:33 Mário Gamito
2005-01-21 20:31 ` urgrue
0 siblings, 1 reply; 3+ messages in thread
From: Mário Gamito @ 2005-01-21 19:33 UTC (permalink / raw)
To: linux-admin
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á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: gamito@netual.pt
www.netual.pt
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Deleting multiple directories with the same name
2005-01-21 19:33 Deleting multiple directories with the same name Mário Gamito
@ 2005-01-21 20:31 ` urgrue
2005-01-22 10:40 ` Ricardo Catalinas Jimenez
0 siblings, 1 reply; 3+ messages in thread
From: urgrue @ 2005-01-21 20:31 UTC (permalink / raw)
To: Mário Gamito; +Cc: linux-admin
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ário 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 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á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: gamito@netual.pt
> www.netual.pt
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Deleting multiple directories with the same name
2005-01-21 20:31 ` urgrue
@ 2005-01-22 10:40 ` Ricardo Catalinas Jimenez
0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Catalinas Jimenez @ 2005-01-22 10:40 UTC (permalink / raw)
To: linux-admin
[-- Attachment #1: Type: text/plain, Size: 353 bytes --]
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 = 662C EBF7 9220 0F14 C644 F90B DC3E A163 7F8D CDAE
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-01-22 10:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-21 19:33 Deleting multiple directories with the same name Mário Gamito
2005-01-21 20:31 ` urgrue
2005-01-22 10:40 ` Ricardo Catalinas Jimenez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).