A first naive approach to the problem, tweek it to your needs:
find . | awk -F'_' '$3<20130125' | xargs rm
To prevent find
from doing a recursive search and just stay in current folder:
find . \( ! -name . -prune \) -type f | ...
2nd update:
Add the name
parameter to only list files that contains the string "EXPORT_v1x0"
find . \( ! -name . -prune \) -type f -name "EXPORT_v1x0*" | ...
Simpler way to make find
non-recursive is to use the maxdepth
flag
find . -maxdepth 1 -type f -name "EXPORT_v1x0*" | ...