On AIX 5200-07-00 I have a find command as following to delete files from a certain location that are more than 7 days old. I am being told that I cannot use -exec option to delete files from these directories.
Having said that I am more curious to know how this can be done.
That's a big limitation. Additionally if GNU find/xargs was installed, their -0 option could have been used to handle the bad filenames... Maybe this will help:
find /history_directory -mtime +7 |
while read file
do
rm -- "$file"
done
[ Tested on Solaris with non-GNU tools. Does not handle filenames with embedded newlines. ]