Failing to match directories using find -regex -



Failing to match directories using find -regex -

i have directories under /var/log in form of ip addresses i.e. 192.168.10.3

however regex have written not matching them. clues?

find /var/log/ -type d -regex '/var/log/([0-9]+\.){3}[0-9]+'

cheers.

change regex to,

find /var/log/ -type d -regextype sed -regex ".*/\([0-9]\{1,3\}\.\)\{3\}[0-9]\+"

or

find /var/log/ -type d -regextype posix-egrep -regex ".*/([0-9]+.){3}[0-9]+"

regex find

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -