# Reg: Search for a directory

**URL:** https://community.unix.com/t/reg-search-for-a-directory/180773
**Category:** Shell Programming and Scripting
**Created:** [January 7, 2008, 5:30am UTC](https://community.unix.com/t/reg-search-for-a-directory/180773 "2008-01-07T05:30:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Rajanikanth](https://community.unix.com/letter_avatar/rajanikanth/32/5_5575768a8748004e209b776fc1b2916d.png) [@Rajanikanth](https://community.unix.com/u/Rajanikanth)
#### Post date: [January 7, 2008, 5:30am UTC](https://community.unix.com/t/reg-search-for-a-directory/180773/1 "2008-01-07T05:30:08Z")

</div>

Dear All,

I am new to Unix and i need a small Help from you Guys.....

The current structure of my system is as follows:  
/Abc/xyz/cpd/std/re/doc

Each cpd directory has n number of std's. Each std has n number of re's.  
My requirement is to write a UNIX script that would search whether doc directory is present under all re's directories.  
If it is not, i need to write it into a temp file with the full path /Abc/xyz/cpd/std/re/doc.

Can anyone of you help me in writing a UNIX script for the above mentioned requirement ASAP.

Looking forward to your response.

Thank You.

Regards,  
Rajani-kanth.
