I have thousands files in format randomstring_XXXXXXXX.jpg where 'xxx' is unixtime (1388415305). Now I need to delete all files older than some (unixtime) date.
Does anyone have a solution for this?
Perl solution (untested):
perl -e 'unlink grep { ($d) = /_([0-9]+)\.jpg/ and $d < XXXXXX } glob "*_*.jpg"'