3 # find the most antiquated files in a folder.
4 # made friendlier for dell by avoiding the .clusterConfig directory and for
5 # netapp by avoiding the .snapshot directory.
7 declare -a paths=("${@}")
8 echo "paths 1 now is: ${paths[@]}"
9 if [ ${#paths} -eq 0 ]; then
12 echo "paths 2 now is: ${paths[@]}"
14 for pathname in "${paths[@]}"; do
17 echo oldest on path: $pathname
21 find "$pathname" -path "$pathname/.clusterConfig" -prune -o -path "$pathname/.snapshot" -prune -o -type f -print0 | xargs -0 stat --format '%Y :%y %n' | sort -n | cut -d: -f2- | head -n 20