Quantcast
Channel: Admins Goodies » rm
Viewing all articles
Browse latest Browse all 10

Deleting files in Linux

$
0
0

Question

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).

Answer

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


Viewing all articles
Browse latest Browse all 10

Trending Articles