To list the files
find ./directory -atime +2 -ls
-mtime +2
To remove
find ./directory -atime +2 -exec rm {} \;
-atime = Access Time
-mtime = Modified Time
I have another question, do you have a script that will mv a list for files base a range of numbers? I have some log files that is generated from Oracle like 0001_000001000.arc and the number is increamented by one, now I need some way to copy/move a certain range of these files to somewhere else.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.