我想簡單地取1到日誌文件11個500與一個正則表達式:正則表達式匹配的日誌文件1至11
log4j-cnode1.log.11
log4j-cnode1.log.10
log4j-cnode1.log.9
log4j-cnode1.log.8
log4j-cnode1.log.7
log4j-cnode1.log.6
log4j-cnode1.log.5
log4j-cnode1.log.4
log4j-cnode1.log.3
log4j-cnode1.log.2
log4j-cnode1.log.1
,所以我不希望獲取的log4j-cnode1.log.12,log4j的-cnode1.log.13,...,log4j的-cnode1.log.500
我嘗試這個命令:
find . -iname "log4j-cnode1*\.log\.(1[0-1]|[1-9])"
爲什麼這不是工作?
1至9正常工作與此:
find . -iname "log4j-cnode1*\.log\.[1-9]"
1至11,對嗎? – 2013-02-20 08:41:00