I had a problem on a FTP server running Solaris 9 that had tons of old files and many of them had spaces in the names. How do you automate removing the old files (the real concern being the spaces in the filenames)? Most solutions recommend using -print0 in find or xargs -0, neither of which are options in Solaris 9.
This command removes any files older then 2 years old in the current directory:
find . -type f -mtime +730 | while read filename; do rm -f “$filename”; done