Hello,

I'm struggling with the PCRE ignore patterns.  I found
http://perldoc.perl.org/perlre.html to explain the patterns and pcregrep
from http://linux.die.net/man/1/pcregrep to test them, but I'm not getting
the results I'm expecting.  I don't know if that is a good tool to use or
not.

# pcregrep -drecurse ./*.bak /  
This command looked inside of every file instead of just the directory
listings.

So, in the root, I did
# find / -name '*' > /home/listing2.txt
That gave me a list of all the files, with complete paths.  

So now I use the command
# pcregrep ./*.bak listing2.txt
That command gave me all the files with "bak" anywhere in the name, but only
two directories or deeper:
/var/backups/gshadow.bak
/usr/share/app-install/icons/gnomebaker.xpm
...

Not
/boot/initrd.img-2.6.22-14-generic.bak

I didn't want "gnomebaker" excluded at this time, so I used the command
# pcregrep /*[.]bak listing2.txt
This gave me only the files ending with ".bak", ".bakup" and so forth.  This
is good.

So a couple questions.
1)  Every example provided with fsvs starts with ./
    Is there something magical about that in fsvs?
    Or do you want to start two directories down?

2)  The docs have the pattern ./ **.bak
    That matches everything in pcregrep.
    How does that pattern work?

Sorry for the long post.

Thanks,

Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to