[6723] in RedHat Linux List
Re: Using "find" to get rid of cores etc.
daemon@ATHENA.MIT.EDU (Paul Anderson)
Fri Nov 29 19:51:36 1996
Date: Fri, 29 Nov 1996 20:08:14 -0500
From: Paul Anderson <andersop@agapesystems.com>
To: redhat-list@redhat.com
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com
Studentid wrote:
>
> I've been trying to get rid of all cores in my home directory
> which also contains about 100 sub- and subsub-directories
> using find command:
>
> main$ cd
> main$ find ./ -name core -exec rm
> find: missing argument to `-exec'
> main$ find ./ -name core -exec rm {}
> find: missing argument to `-exec'
> main$ find ./ -name core -exec rm {core}
> find: missing argument to `-exec'
> main$ find ./ -name core -exec rm core {}
> find: missing argument to `-exec'
> main$ find ./ -exec rm -rf core {}
> find: missing argument to `-exec'
> main$ find ./ -exec rm core {}
> find: missing argument to `-exec'
> main$ find ./ -name core -exec "rm core"
> find: missing argument to `-exec'
> main$ find ./ -name core -exec "rm core" {}
> find: missing argument to `-exec'
> main$
>
According to the man page the proper context would have the command
after the exec terminated with a ";". However, even using the advised
construct I got the same error you. I must admit I have never used this
option before.
My preferred method for getting rid of core files is to run find with
the option fls [filename] which will write the output to a file which
can then be reviewed for the proper core files ( I do not trust the
computer, regardless of my skill or lack thereof, to decide this for me)
and then run a shell script that basically reads the file name and then
deletes the files one by one 'til done.
As there are many tools available to do this with I am sure you will get
a plethora of responses. As to your original question about the find
command, I am now curious and want to figure this out.
Paul Anderson
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
________________________________________________________________________
http://www.redhat.com/RedHat-FAQ http://www.redhat.com/RedHat-Errata
http://www.redhat.com/RedHat-Tips http://www.redhat.com/mailing-lists
------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null