# Problem executing find file command in Linux

**URL:** <https://community.unix.com/t/problem-executing-find-file-command-in-linux/239462>\
**Category:** UNIX for Dummies Questions & Answers\
**Created:** [May 6, 2009, 12:32pm UTC](https://community.unix.com/t/problem-executing-find-file-command-in-linux/239462 "2009-05-06T12:32:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackdaw\_at\_work](https://community.unix.com/letter_avatar/jackdaw_at_work/32/6_449c533f586939b6e5f246632a46421f.png) [@jackdaw\_at\_work](https://community.unix.com/u/jackdaw_at_work)\
**Post date:** [May 6, 2009, 12:32pm UTC](https://community.unix.com/t/problem-executing-find-file-command-in-linux/239462/1 "2009-05-06T12:32:02Z")

</div>

When trying to find a list of files with specific text in them using

```nohighlight
 
find . -type f -exec grep -l "DataStage Job 4263" {}\;

```

I get error

```nohighlight
 
find: missing argument to 'exec'

```

How can I correct this ? I'm on Linux Red Hat.  
Cheers

PS I'm a DataStage programmer not a systems support bod !

---

<div class="post-metadata">

**Author:** ![methyl](https://community.unix.com/letter_avatar/methyl/32/6_449c533f586939b6e5f246632a46421f.png) [@methyl](https://community.unix.com/u/methyl)\
**Post date:** [May 6, 2009, 1:07pm UTC](https://community.unix.com/t/problem-executing-find-file-command-in-linux/239462/2 "2009-05-06T13:07:04Z")

</div>

Needs a space character after {}

```nohighlight
find . -type f -exec grep -l "DataStage Job 4263" {} \;

```

---

<div class="post-metadata">

**Author:** ![jackdaw\_at\_work](https://community.unix.com/letter_avatar/jackdaw_at_work/32/6_449c533f586939b6e5f246632a46421f.png) [@jackdaw\_at\_work](https://community.unix.com/u/jackdaw_at_work)\
**Post date:** [May 7, 2009, 3:13am UTC](https://community.unix.com/t/problem-executing-find-file-command-in-linux/239462/3 "2009-05-07T03:13:56Z")

</div>

Job's a good 'un ! :b:

Thanks

---

<div class="post-metadata">

**Author:** ![thanhdat](https://community.unix.com/user_avatar/community.unix.com/thanhdat/32/1056_2.png) [@thanhdat](https://community.unix.com/u/thanhdat)\
**Post date:** [May 7, 2009, 4:17am UTC](https://community.unix.com/t/problem-executing-find-file-command-in-linux/239462/4 "2009-05-07T04:17:52Z")

</div>

You can also use the pipe like follow:

```nohighlight
 find . -type f |xargs grep -l "some text" 

```

It could be a little faster ^^

---

<div class="post-metadata">

**Author:** ![jackdaw\_at\_work](https://community.unix.com/letter_avatar/jackdaw_at_work/32/6_449c533f586939b6e5f246632a46421f.png) [@jackdaw\_at\_work](https://community.unix.com/u/jackdaw_at_work)\
**Post date:** [May 7, 2009, 4:31am UTC](https://community.unix.com/t/problem-executing-find-file-command-in-linux/239462/5 "2009-05-07T04:31:26Z")

</div>

In my context it was definitely faster. Cheers.
