We Recommend

bash Cookbook: Solutions and Examples for bash Users bash Cookbook: Solutions and Examples for bash Users
bash Cookbook teaches shell scripting the way Unix masters practice the craft. It presents a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell -- the bash shell -- and cygwin or other popular Unix emulation packages.


Posted By

noah on 02/10/09


Tagged

path search filter directory find macports prune


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

Dorgendubal


Filtering the Find command


Published in: Bash 


How to filter files and directories with the find command.

The command below finds files that end in "sass," but not the file named "constants.sass," and not the directory "landing_page," nor any of its contents.

  1. find . ! -name "*constants.sass" ! -path "*landing_page*" -name "*sass"

Report this snippet 

You need to login to post a comment.