View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 1 post ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Mon Jul 12, 2010 9:51 pm 
Offline
Joined: Tue Aug 22, 2006 9:11 am
Posts: 127
Location: Perth
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

_________________
DRM 'manages access' in the same way that jail 'manages freedom.'
_________________
Intel P4 2.6
Intel Desktop Board
2GB DDR400
nVidia 6600GT
Dvico HDTV+
Dvico Dual 4
200GB WD for Swap /boot & /
2x 500GB WD with LVM & XFS for /myth/tv


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu