OS X Terminal Command to Find All Assets

Published 25th August 2013

So here is something which just came in handy. This Terminal command finds and lists all of the assets (JS/CSS/Images) of your “assets” folder in your web project:

find assets/* ( -iname "*.js" -o -iname "*.css" -o -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.gif" ) -o -path assets/cache -prune

Note that we exclude results from the “assets/cache” folder by using -prune. Handy.