Posted By

kentoy on 08/09/10


Tagged

Bash rm xargs filetest


Versions (?)

Bash [One Liner] - Remove Utility : Remove All Files Other Than Ext


 / Published in: Bash
 

  1. for x in *; do [-x $x -a -f $x.ext] && echo $x; done | xargs rm

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: kentoy on August 9, 2010

where: x may be any other file extension or suffix

Posted By: kentoy on August 9, 2010

where: x may be any other file extension or suffix

You need to login to post a comment.