I need to find all files matching a certain criteria and delete them – here’s a snippet:
/var/www/somesite/releases/{many directories}/tmp/attachment_fu
I’d like to find all files in any tmp/attachment_fu
directory and delete them – the problem is that the {many directories}
is throwing off my find
skills (or maybe find
is the wrong command – I also tried locate
to no avail).
May be I’m missing something but rm /var/www/somesite/releases/*/tmp/attachment_fu/*
seems to be what you want. ls /var/www/somesite/releases/*/tmp/attachment_fu
can be used to see what will be deleted
Check more discussion of this question.