Monday, June 8, 2015

Use find command but exclude files in two directories & svn set-depth

http://www.gnu.org/software/findutils/manual/html_mono/find.html

find [file...] [expression]

1.3 find Expressions

The expression that find uses to select files consists of one or more primaries, each of which is a separate command line argument to findfind evaluates the expression each time it processes a file. An expression can contain any of the following types of primaries:
options
affect overall operation rather than the processing of a specific file; 
tests
return a true or false value, depending on the file's attributes; 
actions
have side effects and return a true or false value; and 
operators
connect the other arguments and affect when and whether they are evaluated.



find . -type f -name "*_peaks.bed" ! -path "./tmp/*" ! -path "./scripts/*" -exec svn update -set-depth empty {} \;