Have you ever been annoyed by trying to find or grep within a Subversion working directory and getting duplicates results from the .svn directories? A popular workaround is:
find . -name .svn -prune -o
And add the condition clause after the -o option. This expression will not look inside the .svn directories but will still return all those directories unless the condition after -o removes them. So we can do better:
find .( -name .svn -prune \) \! -name .svn -o \! -name .svn -o
And again add the condiion clause after the -o option. Elaborating on this expression we can create a script that works just like find and ignore the .svn directories
#!/bin/sh
path=$1
shift
find $path \( -name .svn -prune \) \! -name .svn -o \! -name .svn $@
If we put that in a file named fsvn in our path we could do:
fsvn some/path -mtime -7
And obtain all files modified in the last week in some/path ignoring the .svn directories.