Aliasing the find command tcsh

102 views Asked by At

I'm trying to make an alias for the find command to search recursively within the directory for a string in any part of the filename in tcsh so that I can shrink

find . -name "*foo*"

down to this

fnd foo

Unfortunately I'm getting no matches, or the incorrect number of matches, with the alias below:

 alias fnd find . -name \"\*\!:1\*\"

I don't know if I'm escaping the ", *, and ! correctly with the backslash. When I do Ctrl+x ? to expand the alias, I get find . -name \"*!:1*\" if that helps at all. Thanks!

1

There are 1 answers

0
Arteezy On

Try this alias fnd 'find . -name "*\!:1**"'