Thursday, May 29, 2014

OSX Find Command to Exclude Directory

Given this directory structure, let's get a list of all files that are not in the node_modules directory.

Given Directory Structure

$ git add-commit 'added frontend'
$ tree -C -d -L 2
├── javascript
├── less
├── node_modules
│   ├── grunt
│   ├── grunt-cli
│   ├── grunt-contrib-concat
│   ├── grunt-contrib-less
│   ├── grunt-contrib-uglify
│   └── grunt-contrib-watch
└── public
    ├── css
    └── js

Find command to exclude node_modules

$ find . -not -path "*node_modules*" -type f


  1. I think mimicking popular posts on other blogs is one of the best ways to get a good idea which will be popular.Such a lovely blog you have shared here with us. Really nice.
    Clipping Magic

  2. Despite if some person chase down his key thing, thus he/she desires to be open that in unobtrusive component, in this way that thing is kept up here.
    Video player for Mac