Article View: es.comp.os.linux.programacion
Article #1380Re: borrar recursivamente utilizando una mascara
From: David Serrano (Hue-Bond)
Date: Tue, 24 Jan 2006 06:57
Date: Tue, 24 Jan 2006 06:57
26 lines
1778 bytes
1778 bytes
icue, lun20060123@22:05:16(CET):
>
> Por ejemplo trato inocentemente de hacer esto:
> # rm *.bak -rf
>
> Que no funciona, pero que se podr� hacer de algun modo.
Todos te han dicho find -exec pero a mí me gusta más find|xargs, por una
razón bastante importante cuando se trata de muchos archivos:
$ find . -exec echo {} \;
.
./file1
./file2
./file3
./file4
$ find . | xargs echo
. ./file1 ./file2 ./file3 ./file4
$ _
find -exec ejecuta el comando tantas veces como archivos haya, find|xargs lo
ejecuta el mínimo de veces necesarias con el máximo de argumentos posible.
--
David Serrano
Technical Details
Message-ID:
<slrndtbjul.ril.responder_solo_en_el_grupo@genus.hue-bond.info>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!news.antakira.com!antonio.escomposlinux.org!cernicalo.escomposlinux.org!escomposlinux.org!not-for-mailReferences:
<dr3gec$hjh$1@negre.bartolo>Show Full Headers
Complete Article Headers
X-Google-Thread: f86c8,4759451d56775892 X-Google-Attributes: gidf86c8,public X-Google-Language: SPANISH,UTF8 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!news.antakira.com!antonio.escomposlinux.org!cernicalo.escomposlinux.org!escomposlinux.org!not-for-mail From: "David Serrano (Hue-Bond)" <responder_solo_en_el_grupo@yahoo.es> Newsgroups: es.comp.os.linux.programacion Subject: Re: borrar recursivamente utilizando una mascara Date: Tue, 24 Jan 2006 06:57:25 +0000 (UTC) Organization: I work for myself Lines: 26 Message-ID: <slrndtbjul.ril.responder_solo_en_el_grupo@genus.hue-bond.info> References: <dr3gec$hjh$1@negre.bartolo> NNTP-Posting-Host: 210.red-83-40-156.dynamicip.rima-tde.net Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: cormoran.emeteo.local 1138085845 21903 83.40.156.210 (24 Jan 2006 06:57:25 GMT) X-Complaints-To: emeteo@escomposlinux.org NNTP-Posting-Date: Tue, 24 Jan 2006 06:57:25 +0000 (UTC) X-Message-Flag: Visit http://www.debian.org/ X-MSMail-Priority: High Mail-Copies-To: nobody User-Agent: slrn/0.9.8.1pl1 (Debian)