Posted By

bionic on 01/10/12


Tagged

rm grep find zip


Versions (?)

Find a directory withing a compressed file and remove it.


 / Published in: Bash
 

Find a directory withing a compressed file and remove it.

  1. find /my/directory -name '*zip' -exec sh -c 'unzip -l {} | grep -q MY_SEARCHPHRASE && rm {}' ';'

Report this snippet  

You need to login to post a comment.