[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Fw: find command usage




sreangsu acharyya wrote:

> >
> > Hi
> > I tried to do what was suggested. That is, I did
> >
> > find . -name '*[ch]' -follow -print |  egrep -v  "^2600 | ^3600"
>
> > However, the file size is the same as earlier, meaning that it didnt reject
>
> the pattern is not right because of the space in beween ( egrep will
> search for a white space there)
>

That 's correct you need to remove the space ( if any )
however for what you want you need to understand the output of find
it preceeds the file name with path from present directory
to get what you want do

find . -name '*[ch]' -follow -print | egrep -v "/2600|/3600" > cscope.files


>
> try using egrep -v "^[23]00"
>
> should work
>
> ---------------------------------------------
> Find out more about this and other Linux India
> mailing lists at http://lists.linux-india.org/