As @damium@programming.dev says you may be able to do this with find
command. This command lists all PDF files under ~/tmp that were created more than 7 days ago and does a directory listing. You could use this as a basis to move create an archive of individual files.
find ~/tmp -ctime +7 -iname "*pdf" -exec ls -rlht {} \;
The find
command also has a -delete
flag.
I have in the past used this combination to implement file management. I don't have access to the script any more. I don't remember why we used a shell script rather than logrotate as per @oddityoverseer@lemmy.world
The original interview is no longer available, but here are references.
https://www.theregister.com/2013/08/24/top_10_steve_ballmer_quotes_from_microsoft_history/
"Ballmer: I may have called Linux a cancer but now I love it" https://www.zdnet.com/article/ballmer-i-may-have-called-linux-a-cancer-but-now-i-love-it/
"Former Microsoft CEO Ballmer does about-face on Linux technology" https://www.reuters.com/article/us-microsoft-ballmer-linux-idUSKCN0WC2RA/