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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -