Still trying to wrap my brain around the idea that there is no way to tell Ubuntu "delete any file in this folder that hasn't been accessed in X days" without writing a shell script
-
Still trying to wrap my brain around the idea that there is no way to tell Ubuntu "delete any file in this folder that hasn't been accessed in X days" without writing a shell script
-
Vincent :coffeecup:replied to Jason Lefkowitz last edited by
@jalefkowit What, find is too good for you? I think this is right:
function ddays {
DIR=$1
DAYS=$2
find $DIR -type f -atime +$DAYS -exec rm -f {} \;
}or stick it in cron
-
Jason Lefkowitzreplied to Vincent :coffeecup: last edited by
@vincent What can I say, I’m a filthy casual
Copyright © 2024 NodeBB | Contributors