LinHES Forums

Clearing out Resume files
Page 1 of 1

Author:  techman83 [ Mon Jul 12, 2010 9:51 pm ]
Post subject:  Clearing out Resume files

Got motivated to sort something out that was bugging me. I tend not watch through the credits of videos I watch, and having to start a video I've not watched after a week twice within 5 seconds was bugging me.

So I conjured a find command and cron job to do the clearing out for me. Made it check files smaller than 10k, so there shouldn't be any risk of clearing out videos with ".resume" in their title, however unlikely it is (probably isn't necessary, but I like to put in safe guards for edge cases!)


find /path/to/videos/ -size -10k -ctime +5 -type f -name \*.resume -exec rm {} \;

Cron example (assumes mythtv user owns the resume files)

su mythtv
crontab -e
00 12   * * *  find /path/to/videos/ -size -10k -ctime +5 -type f -name \*.resume -exec rm {} \;

If you want to just search for them

find /path/to/videos/ -size -10k -ctime +5 -type f -name \*.resume

I updated the mplayerResume page on the wiki.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group