# Re: search file in a directory

**URL:** <https://www.ruby-forum.com/t/re-search-file-in-a-directory/73452>\
**Category:** Ruby\
**Created:** [October 24, 2006, 7:22pm UTC](https://www.ruby-forum.com/t/re-search-file-in-a-directory/73452 "2006-10-24T19:22:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 24, 2006, 7:22pm UTC](https://www.ruby-forum.com/t/re-search-file-in-a-directory/73452/1 "2006-10-24T19:22:26Z")

</div>

From: James Edward G. II [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]

> On Oct 22, 2006, at 12:15 PM, Robert K. wrote:
> 
> > Do we have a gateway problem again?  
> > We took some pretty drastic measures when we addressed the last  
> > Gateway issue and haven’t seen a thing since. I think we have it  
> > pretty locked down now.

If “locked down” is meant to imply “dialed in”, i.e. functioning  
perfectly…I think you’re mistaken.

In the last several days I’ve seen a bunch of items on the newsgroup  
that are replies to messages that never showed up there. And (I think)  
vice versa - stuff that shows up on [groups.google.com](http://groups.google.com) that isn’t showing  
up on the mailing list.

---

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 24, 2006, 9:59pm UTC](https://www.ruby-forum.com/t/re-search-file-in-a-directory/73452/2 "2006-10-24T21:59:54Z")

</div>

On 10/24/06, Gavin K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> In the last several days I’ve seen a bunch of items on the newsgroup  
> that are replies to messages that never showed up there. And (I think)  
> vice versa - stuff that shows up on [groups.google.com](http://groups.google.com) that isn’t showing  
> up on the mailing list.

Just out of curiosity…

Whenever I have to find a file in Ruby script…normally, what I do is:

data = `find .`  
file\_array = data.split(“\n”)  
#iterate through the array here…and find your gem

Isn’t it faster than inbuilt find?  
Of course…i could be completely wrong, and above script can be used  
only on a Unix box.
