regex - Unix - File Search with Regular expression -
find . -iname "abc_v?_test.txt" -print
which finds files
abc_v1_test.txt, abc_v2_test.txt, ..., abc_v9_test.txt
but how can additionally abc_v10_test.txt, abc_v11_test.txt..
you can use -regex
option well:
find . -regextype posix-egrep -iregex ".*abc_v[0-9]{1,2}_test\.txt$"
Comments
Post a Comment