It's safer to:

     find / -name core -type f | xargs rm -f

If you want to do it the hard way, do this:

     find / -name core -type f -exec rm -f "{}" ";"

If you don't use the "quotes", the shell will interpret the {} and the
; and find will never get to see them.

-- Raju

>>>>> "Shafi" == A Shafi Mani <[EMAIL PROTECTED]> writes:

    Shafi> Try this command find . -name core -exec rm {} \; -print

    Shafi> All the best and dont blame me if everything disappears and
    Shafi> your machine crashes and all hell turns loose:-)))

    Shafi> Shafi Shantaram Sahyadri wrote:

    >> Hello to all, this small thing is killing me!!!
    >> 
    >> man page of "find" says you can use "-exec" or "-ok" to execute
    >> any command from the result of find command, using this,
    >> consider I want to find and delete all "core" files I will use
    >> the command
    >> 
    >> #find / -name core -print -exec rm{} ;
    >> 
    >> or
    >> 
    >> #find / -name core -print -ok rm {} ;
    >> 
    >> but this does not work, I get a error msg saying no arguments
    >> specifed for -exec or -ok, I know this is silly but I want to
    >> find out the reason why is this not woking, is it fault of the
    >> program or my fault ie the way cmd is given, thankx Sahyadri

----------------------------------------------
The mailing list archives are available at
http://lists.linux-india.org/cgi-bin/wilma/LIH

Reply via email to