Below is a code to customise search in Linux using find. find would recurse through all the directories. I needed to omit some directories which I knew didn't have the file I was looking for but instead have games. So recursing through them would cause enormous processor overhead and time loss. So I wrote a code in shell script to omit specific directories..
cd /
for aa in `ls`
do
if [ "$aa" != "resident_evil" ] ; then
if [ "$aa" != "usr1" ] ; then
if [ "$aa" != "usr2" ] ; then
if [ "$aa" != "usr3" ] ; then
if [ "$aa" != "unreal" ] ; then
if [ "$aa" != "quake3" ] ; then
echo -e " Current search path: "
cd $aa
pwd
find . -name "*.a"
fi
fi
fi
fi
fi
fi
cd /
done
cd /
for aa in `ls`
do
if [ "$aa" != "resident_evil" ] ; then
if [ "$aa" != "usr1" ] ; then
if [ "$aa" != "usr2" ] ; then
if [ "$aa" != "usr3" ] ; then
if [ "$aa" != "unreal" ] ; then
if [ "$aa" != "quake3" ] ; then
echo -e " Current search path: "
cd $aa
pwd
find . -name "*.a"
fi
fi
fi
fi
fi
fi
cd /
done
Comments