LinHES Forums http://forum.linhes.org/ |
|
Clearing out Resume files http://forum.linhes.org/viewtopic.php?f=3&t=21226 |
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!) Command: Code: find /path/to/videos/ -size -10k -ctime +5 -type f -name \*.resume -exec rm {} \; Cron example (assumes mythtv user owns the resume files) Code: 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 Code: find /path/to/videos/ -size -10k -ctime +5 -type f -name \*.resume
I updated the mplayerResume page on the wiki. http://www.knoppmythwiki.org/index.php?page=mplayerResume |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |