I need a script to delete oldest files in directory to keep from using up all space
by Clutch2 from LinuxQuestions.org on (#6J4VG)
My security system sends alert video to a couple pi's in case the pc that does the monitoring is stolen. The problem is sometimes I space off and forget to delete files before I run out of storage.
Anyone have a script that I can run as a cron job to keep the directory contents under a specified size by deleting the oldest files. The directory right now is half full and has 6000 files in it to give you an idea.
Thanks,
Anyone have a script that I can run as a cron job to keep the directory contents under a specified size by deleting the oldest files. The directory right now is half full and has 6000 files in it to give you an idea.
Thanks,