[oclug] find

Milan Budimirovic milan.budimirovic at sympatico.ca
Thu Apr 22 00:38:11 EDT 2004


Bob Lockie wrote:

> I want to "echo > *" to each file in a directory.
>
> I tried:
> find . -name \* -exec "echo > {}" \;
> but that gives me a:
> find: echo > ./each_file: No such file or directory
>

I'm not sure what you're trying to do here.

  echo > *

redirects STDIN to all files that match "*" (basically all files that 
don't begin with a ".").

I don't think that bash or any UNIX-like shell will allow you to 
redirect to "*". Try it from the command prompt.



More information about the OCLUG mailing list