Why no exec command in RHEL5

Cameron Simpson cs at zip.com.au
Sun Apr 24 22:27:55 UTC 2011


On 24Apr2011 23:23, Abhilash abhi <abhilashck72 at gmail.com> wrote:
| Why there is no command `exec` in RHEL5.
| 
| [root at localhost ~]# which exec
| /usr/bin/which: no exec in
| (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin)

"exec" is a shell builtin; it _cannot_ be a standalone command.

| because of this i am not able to execute finds output using exec!!

Urr, or as another poster points out, the "exec" in find is a switch,
and is spelt "-exec". Eg:

  find . -type d -exec ls -ld {} ';'

See "man find" for details.

Cheers,
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

The ship is cold -- and damp.  I complain -- but no one listens.
        - Capt. Kirk, Star Trek XXIII: _So Very Tired_
          Jim Hill <jimhill at uxh.cso.uiuc.edu>




More information about the redhat-list mailing list