32 lines
593 B
Bash
32 lines
593 B
Bash
|
#!/bin/bash
|
||
|
# For NNM-Club Uploaders
|
||
|
# Copyright (c) 2012 Valdos Sine <fat0troll at yandex dot ru>
|
||
|
#
|
||
|
# Usage:
|
||
|
#
|
||
|
# ./massps.sh
|
||
|
#
|
||
|
# Install pyrocore by executing:
|
||
|
#
|
||
|
# sudo easy_install pyrocore
|
||
|
|
||
|
TMPDIR=`mktemp -d`
|
||
|
|
||
|
SIZE=0
|
||
|
COUNT=0
|
||
|
|
||
|
# Find all torrents
|
||
|
find . -name *torrent > $TMPDIR/allfilez.txt
|
||
|
|
||
|
while read line
|
||
|
do
|
||
|
COUNT=$(($COUNT + 1))
|
||
|
echo "$COUNT"
|
||
|
INCREMENT=`lstor "$line" -qo __size__`
|
||
|
SIZE=$(($SIZE + $INCREMENT))
|
||
|
done < $TMPDIR/allfilez.txt
|
||
|
|
||
|
echo "$SIZE bytes -> $(($SIZE / 1024)) KB -> $(($SIZE / 1024 / 1024 )) MB -> $(($SIZE / 1024 / 1024 / 1024)) GB."
|
||
|
|
||
|
rm -r $TMPDIR
|