Why no exec command in RHEL5
Abhilash abhi
abhilashck72 at gmail.com
Mon Apr 25 06:17:38 UTC 2011
Hi,
I did man find and everything...
What i am doing is deleting the 0 size files within a directory and using
exec with find.
find ./ -size 0 -type f -exec rm { } \;
But the above command is not working..
On Mon, Apr 25, 2011 at 3:57 AM, Cameron Simpson <cs at zip.com.au> wrote:
> 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>
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>
--
Regards,
Abhilash
More information about the redhat-list
mailing list