3 ms·
zsh can be a shoein replacement for bash, and its globbing facilities makes 'find' almost obsolete for me. For example: find . -name "*.css" is: ls -d **
by satiani 15y ago
zsh can be a shoein replacement for bash, and its globbing facilities makes 'find' almost obsolete for me. For example:
find . -name "*.css"
is:
ls -d **/*.css
in zsh. Other examples, all derived from the article:
find . -type f -name "*.css" ==> ls **/*.css(.)
find . -name "*.css" -exec grep -l "#content" {} \;
==> grep -l "#content" **/*.css
find . -ctime -1 -type f ==> ls **/*(.c-1)
find . \! -path "*CVS*" -type f -name "*.css"
==> ls **/*.css(.e{'echo $REPLY | grep -v "CVS"'})
More can be found in the "Glob Qualifiers" section of the zshexpn(1) man page.