I have to come up with a find command to find certain files in a directory. The directory has sub directories and sym-links to other directories. If I use the following find command it ignores the sym-links:
find $dir/ -name '*.out' -size 0 -mtime +0
The following follows the sym-links:
find -L $dir/ -name '*.out' -size 0 -mtime +0 2
I am trying to figure out a way to use -prune and additional -name flags to omit certain elements from the directory. I need something that works on both Linux and AIX.
Some commands I've tried:
find -L . ( -name dest ) -prune -o -name "*.out"
find -L $dir -name *.out ( ! -name "dest" -prune )
-prune?find? BTW you could compile and use GNU findutils on your AIX system