List all files modified in last 5 minutes excluding .svn directories
I want to list all files modified within the last 5 minutes, excluding .svn directories.
I've worked together the following script which does not seem to abide by any -atime or -ctime params.
find . -atime -5m -type d -name .svn -prune -o -type f -print
I feel like I'm digging myself into a hole that an extra set of eyes could spot easily.
Try a different order of arguments. Your command:
- If an entry is accessed within five minutes and is a directory and has the name .svn, then the entry is ignored
- otherwise, for all other cases, if it's a file, print the name
The following command prunes .svn directories before descending into them:
find . -type d -name .svn -prune -o -mmin -5 -type f -print
If a file is a directory and has the name .svn, ignore it and do not descend into it either. Otherwise, if it is last modified (-mmin) within 5 minutes and a file, print the filename.