Changed how find function operates

This commit is contained in:
Tony Grosinger 2013-03-21 21:13:05 -07:00
parent e71296fa60
commit b6b00d0277

View File

@ -31,4 +31,10 @@ fi
# (f)ind by (n)ame
# usage: fn foo
# to find all files containing 'foo' in the name
function fn() { ls **/*$1* }
function fn() {
if [ $# -eq 2 ]; then
sudo find $1 -name $2
elif [ $# -eq 1 ]; then
find `pwd` -name $1
fi
}