August 24, 2013

OS X Terminal Command to Find All Assets

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.

Looking for more?

Subscribe to my newsletter to get infrequent updates in your inbox. Or follow me on Twitter.