Hello All,
How to remove older than one month folders & only current path only .
Please provide command for create folders more than 30 days for Learning & housekeep practice purpose .
if possible any command then please provide .
I am waiting for your valuable information .
Thanks & Regards,
Jeesshnasree
Hello.
Only would like to make a small remark: in original task talking about creation "to create folder.., ", but both solution example suggest modification, it is a big difference:
mkdir new ;
ls -ld new drwxr-xr-x. 2 root root 4096 Aug 22 19:28 new
ls -lcd new drwxr-xr-x. 2 root root 4096 Aug 22 19:28 new
but after touch -d '30 days' new
ls -ld new drwxr-xr-x. 2 root root 4096 Sep 21 2025 new
ls -ldc new drwxr-xr-x. 2 root root 4096 Aug 22 19:28 new
Please, be more accurate
@ARoumiantsev I am not familiar with any option to "create" a folder with old time stamp other than creating a folder and altering the mtime/atime.
Do you know any method to achieve that ?
I Do not know as well. I am doing remark to highlight that suggested solution solve other problem then original task
@ARoumiantsev ok not an issue, I suppose the original post creator can clarify regarding their question.
What I could comprehend from the original question was : How to create folder with timestamp more than 30 days ago.
If the request was more clearer then I could have drafted a better response accordingly.
Thank you for pointing out the distinction
I intended to simulate directories that appear older than 30 days, mainly for learning and housekeeping practice (testing cleanup logic with find -mtime).
I appreciate your accuracy. It's a useful reminder, especially when discussing behavior in production environments.
I know that how the files are created with specific time stamp:
touch -t YYMMDDHHMM fileName
I didn't think or even try with this for folder...something new for me...Thank you very much for sharing valuable information..! Nice post..with Nice answers..!
Thanks
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.