2010-03-16, 12:12
#13
find / -name "*.rar" -exec unrar {} +
#!/bin/zsh
r () {
cd $1
for f in *(/N); (r $f)
RARFILES=(*.(rar|r<0-9><0-9>)(N))
if [[ $#RARFILES > 0 ]]; then
unrar x ${(q)RARFILES[1]}
if [[ $? = 0 ]]; then
echo SUCCESS
#rm $RARFILES
fi
fi
}
if [[ $# = 0 ]]; then
echo "Usage: unrar.zsh directory"
else
r $1
find <sök_rot_katalog> -name "*.rar" -execdir unrar <enl. manual> {} +
#!/bin/zsh
r () {
cd $1
for f in *(/N); (r $f)
RARFILES=((#i)*.(rar|r<0-9><0-9>)(N))
if [[ $#RARFILES > 0 ]]; then
if unrar x ${(q)RARFILES[1]}; then
echo SUCCESS
#rm $RARFILES
fi
fi
}
if [[ $# = 0 ]]; then
echo "Usage: unrar.zsh directory"
else
r $1
fi
find <sök_rot_katalog> -name "*.rar" -execdir unrar <enl. manual> {} +
#!/bin/sh LOG="/home/ginux/unpacklog" TEMPFOLDER="/home/ginux/lagring/unpacked" FOLDERNAME=$(basename $1) echo $FOLDERNAME mkdir $TEMPFOLDER/$FOLDERNAME touch $TEMPFOLDER/$FOLDERNAME/UnPaCkInG find "$1" -iregex '.*\.rar' -and -not -iregex '.*\.part[0-9]+.rar' \ -or -iregex '.*\.part0*1\.rar' \ | while read RAR do ( cd "${RAR%/*}" unrar x -r "${RAR##*/}" $TEMPFOLDER/$FOLDERNAME ) done >>"$LOG" rm $TEMPFOLDER/$FOLDERNAME/UnPaCkInG
# Maximum and minimum number of peers to connect to per torrent. #min_peers = 40 max_peers = 2000 # Same as above but for seeding completed torrents (-1 = same as downloading) #min_peers_seed = 10 max_peers_seed = 800 # Maximum number of simultanious uploads per torrent. max_uploads = 800 # Global upload and download rate in KiB. "0" for unlimited. download_rate = 9500 upload_rate = 9500 # Default directory to save the downloaded torrents. directory = /home/ginux/torrents/ # Default session directory. Make sure you don't run multiple instance # of rtorrent using the same session directory. Perhaps using a # relative path? session = /home/ginux/.session/ # Watch a directory for new torrents, and stop those that have been # deleted. #schedule = watch_directory,5,5,load_start=./watch/*.torrent #schedule = untied_directory,5,5,stop_untied= schedule = watch_directory,5,5,load_start=/home/ginux/torrents/Temp/*.torrent schedule = untied_directory,5,5,stop_untied= schedule = tied_directory,5,5,start_tied= # Port range to use for listening. port_range = 59432-59432 # Check hash for finished torrents. Might be usefull until the bug is # fixed that causes lack of diskspace not to be properly reported. check_hash = yes system.method.set_key = event.download.finished,unpack_rar,"execute=/home/ginux/.scripts/unpack.sh,$d.get_base_path="
#!/bin/sh LOG="/home/ginux/unpacklog" TEMPFOLDER="/home/ginux/lagring/unpacked" FOLDERNAME=$(basename $1) echo $FOLDERNAME mkdir $TEMPFOLDER/$FOLDERNAME touch $TEMPFOLDER/$FOLDERNAME/UnPaCkInG find "$1" -iregex '.*\.rar' -and -not -iregex '.*\.part[0-9]+.rar' \ -or -iregex '.*\.part0*1\.rar' \ | while read RAR do ( cd "${RAR%/*}" unrar x -r "${RAR##*/}" $TEMPFOLDER/$FOLDERNAME ) done >>"$LOG" rm $TEMPFOLDER/$FOLDERNAME/UnPaCkInG
# Maximum and minimum number of peers to connect to per torrent. #min_peers = 40 max_peers = 2000 # Same as above but for seeding completed torrents (-1 = same as downloading) #min_peers_seed = 10 max_peers_seed = 800 # Maximum number of simultanious uploads per torrent. max_uploads = 800 # Global upload and download rate in KiB. "0" for unlimited. download_rate = 9500 upload_rate = 9500 # Default directory to save the downloaded torrents. directory = /home/ginux/torrents/ # Default session directory. Make sure you don't run multiple instance # of rtorrent using the same session directory. Perhaps using a # relative path? session = /home/ginux/.session/ # Watch a directory for new torrents, and stop those that have been # deleted. #schedule = watch_directory,5,5,load_start=./watch/*.torrent #schedule = untied_directory,5,5,stop_untied= schedule = watch_directory,5,5,load_start=/home/ginux/torrents/Temp/*.torrent schedule = untied_directory,5,5,stop_untied= schedule = tied_directory,5,5,start_tied= # Port range to use for listening. port_range = 59432-59432 # Check hash for finished torrents. Might be usefull until the bug is # fixed that causes lack of diskspace not to be properly reported. check_hash = yes system.method.set_key = event.download.finished,unpack_rar,"execute=/home/ginux/.scripts/unpack.sh,$d.get_base_path="
echo $FOLDERNAME
Du måste vara medlem för att kunna kommentera
Flashback finansieras genom donationer från våra medlemmar och besökare. Det är med hjälp av dig vi kan fortsätta erbjuda en fri samhällsdebatt. Tack för ditt stöd!
Swish: 123 536 99 96 Bankgiro: 211-4106