Re: 'core' (patch)

From: willy@thepuffingroup.com
Date: Fri Feb 11 2000 - 15:56:21 EST


On Fri, Feb 11, 2000 at 03:41:53PM -0500, Richard B. Johnson wrote:
> On Fri, 11 Feb 2000 willy@thepuffingroup.com wrote:
>
> > On Fri, Feb 11, 2000 at 11:22:51AM -0500, Richard B. Johnson wrote:
> > > - rm -f core `find . -type f -name 'core' -print`
> > > - rm -f core `find . -type f -name '.*.flags' -print`
> > > + rm -f Core `find . -type f -name 'core' -print`
> > > + rm -f Core `find . -type f -name '.*.flags' -print`
> > > - rm -f core `find . -type f -size 0 -print`
> > > + rm -f Core `find . -type f -size 0 -print`
> > > - rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
> > > + rm -f Core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
> >
> > these are all wrong. they fail to remove the core file which may or may
> > not have been dumped. the solution is to fix the other programs in any
> > case, not change the name of a _directory_ which cannot be a core file,
> > by definition.
>
> Wrong. Find out how 'find' works. The first parameter is the directory.
> This was correctly changed.

Let's take this as an example:

> > > - rm -f core `find . -type f -name 'core' -print`
> > > + rm -f Core `find . -type f -name 'core' -print`

The first parameter to `find' is `.' `Core' is a parameter to `rm'.
Tell me, have you ever used unix before?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:21 EST