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
Post a Comment