Question: How to delete the files which are older than n days WITHOUT use find command?
For some reason, the find command is not used to check which files are older than n days, as a substitute, ‘tmpwatch‘ can be used
The syntax is:
# tmpwatch [time in hours] [directory]
For example, to delete files under /root/testdir/ not accessed for last 45 days ( 24×45 = 1018 hours), run the following command:
# tmpwatch 1080 /root/testdir/
You could also specify the atime/mtime/ctime etc, to learn more, please check
$ man tmpwatch