Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 'mv' all files containing a certain string to a sub-directory



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