Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Free Space on Disk



Hi Axel,

Axel Gruber wrote:
> 
> Hi all
> 
> I´m searching for a Script for the VDR Command - Menue wich can display the
> space on the Harddisks in Hours/Minutes

the space on the hard disk cannot be shown in units
of time, because vdr recordings are vbr.
Of course, you can write a script that does an estimate,
but then a rough estimate in your head will be just as
good and just as easy and just as fast.


> Problem: it should add all availible disk-Space (in my system: /video0 - /video6)
> 
> Does anyone have such a script ?

I don't, but here is what I have:

1) from my commands.conf:

1 Disk Space:df -h|cut -c33-
2 Recordings Space:cd /video;du -skL *|sort -n|cut -c1-38
3 Film Space:cd /video;du -sk */*.rec|sort -n|cut -c1-38
4 Film Time by Name:/home/cko/bin/film_time|cut -c1-38
5 Film Time by Time:/home/cko/bin/film_time|sort -n|cut -c1-38

2) /home/cko/bin/film_time:
#!/bin/sh
cd /video
for f in */*.rec; do
   minutes=`ls -l $f/index.vdr | awk '{print int($5/4/50/60+0.5)}'`
   name=`echo $f|cut -d/ -f1|sed 's@_@ @g'`
   date=`echo $f|cut -d/ -f2|cut -c6-10`
   time=`echo $f|cut -d/ -f2|cut -c12-16`
   echo -e $minutes'\t'$name'  '$date'  ' $time
done



Hope that helps,

Carsten.



Home | Main Index | Thread Index