Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: 'mv' all files containing a certain string to a sub-directory
- X-seq: zsh-users 10910
- From: Heinrich Götzger <goetzger@xxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: 'mv' all files containing a certain string to a sub-directory
- Date: Tue, 31 Oct 2006 14:25:33 +0100
- In-reply-to: <Xns986D84207EE85zzappergmailcom@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <Xns986D84207EE85zzappergmailcom@xxxxxxxxxxx>
zzapper wrote:
> Hi
> I want to 'mv' all files containing a certain string to a sub-directory.
> Should be trivial but cant think how w/o creating a temporary file
>
>
>
Are you looking for smth like:
find . -type f -exec grep -e "a certain string" {} \; -exec mv {} tmp \;
HTH
Heinrich
Messages sorted by:
Reverse Date,
Date,
Thread,
Author