[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Why no exec command in RHEL5



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 zip com au> wrote:

> On 24Apr2011 23:23, Abhilash abhi <abhilashck72 gmail com> wrote:
> | Why there is no command `exec` in RHEL5.
> |
> | [root 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 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 uxh cso uiuc edu>
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request redhat com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>



-- 

Regards,
Abhilash


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]