I am supposed to find a file recursively in a given directory. Rules are not to use find and recursive options like ls -R and grep -r. I can any other other option expect recursive.

I had written the script using recursion.

#!/bin/csh
foreach i (`ls -R $1 | grep : | sed 's/://'`)
readlink -f "$i/$2"
end

Please help me solve this. It is quite urgent.

Thanx

Well I got the answer

use du -a $1|cut -f2|grep $2

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.