Hi,
I want to search in the log directory only. This log directory exists at mutiple places in my directory tree. I know that to exclude any directory we have option - prune but can we do the just opposite of it.. just check a single directory and exclude the rest.
thanks
where=$(find /mydir -type d -name log)
find $where -type f
Hello,
Since you want to check into only one directory 'log'
then
why dont you simply search in the log directory . ![]()
find . -type d -iname "*log*" -exec bash -c 'find ${1} [find options] -exec [actions] {} \; ' _ {} \;
If you specify exactly what you have to find in the log file, then I can frame the exact command.
Regards,
Gaurav.
Thank you very much, Jim. It solved my problem.
---------- Post updated at 01:46 AM ---------- Previous update was at 01:44 AM ----------
Thank you! Gaurav. This is also helpful. but i am making a generic script where storing the directory names in a variable is suitable.
Regards,
Manoj