Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: executing commands in directories containing specific files
- X-seq: zsh-users 18421
- From: Philip Dexter <philip.dexter@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: executing commands in directories containing specific files
- Date: Tue, 11 Feb 2014 20:17:36 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=vWz1AbKOUj9+5GVkv00kI2LqG6vhz8VoDTBrMNEwHso=; b=npC2Xa6Fz2ZkTcuhLpnjyv+l5EnITTCNu3un9Q/jpBEQdB52jPE6Llv4g9zpDw+8Lo 2dMrXyUraPt0GYnYHR4P1CFVZJvTCVhuIKWVp6UlGwrNjLsKtnenCph7/pkecZ/OPI0R HkJ/8EHsM4V5AclogLbknzH9vSPf708+M9zvcqDwdq3MKOjtUENkvWBGHRSWeB//5HkD fTDsZR+zN08gopiT+4VWcGivOZB36g8IdCQ74dbL684amD3refnH7lX8BdlYTQUw1447 mspi+Aa9xH9xSFwHUQVuvx8SoZw52pbdQDSXJXdTh1KOIz9fZdXpRX9my72a5KOVAKpx Dmvg==
- In-reply-to: <ldefjc$9l1$1@ger.gmane.org>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAMXWGTzazAWLG6y1Q_zKvxmUewgAq9Z9CdksQ-Tb7kxfP-RHUg@mail.gmail.com> <ldefjc$9l1$1@ger.gmane.org>
On Tue, Feb 11, 2014 at 7:35 PM, Jan Larres <jan@xxxxxxxxxxxxxx> wrote:
> On 12/02/14 13:11, Leonardo Barbosa wrote:
> > I'd like to find TeX files (find $HOME -type f -name '*.tex'). Let's say
> i
> > have found files a.tex, b.tex, and c.tex. Now, i wanna remove a.aux,
> b.aux,
> > c.aux. What's the best way of doing that?
>
> find $HOME -type f -name '*.tex' -exec rm {} \;
>
>
That won't get the aux files
I would use
for f in $HOME/**/*.tex; do rm $f; rm ${f:r}.aux; done
Messages sorted by:
Reverse Date,
Date,
Thread,
Author