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

Fw: find command usage



Hi
I tried to do what was suggested. That is, I did

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

and I also did

find . -name '*[ch]' -follow -print >test.files


However, the file size is the same as earlier, meaning that it didnt reject
the files having 2600 and 3600.
Some problem here ?
I am using solaris right now, not linux. I hope it is okay to post it here.
please reply
H




harish bashettihalli wrote:

> Hi
> I am using a find that looks like this:
>
> find . -name '*[ch]' -follow -print >cscope.files

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

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

As the requirement may be ......

>
>
> The intention is to get a list of all files with .c and .h extension from
> the present directory recursively in to a file called cscope.files.
>
> If I want to selectively reject files that have '2600' and '3600' as part
of
> the filename, how should I do it ?
> For instance, i want to reject say file '2600debug.h' .
> Can I do it in the same command with a different option ?
> Regards
> Harish
>

Bye
Sumit