Gonzalez Posted February 18, 2010 Report Share Posted February 18, 2010 #!/bin/bash#Author: Avek#Add all files/folders from folder to different archives#Delete files/folders after successfully adding to rar#Split to volume set in mb by user - 1st option eg#./script 10 = 10mb splits Standard size = 100 mbif [ $1 ]; then SIZE=$(($1 * 1024))else SIZE=$((100 * 1024))fiSname=`echo $0 | sed 's/.\///g'`;for x in *do if [ "$x" == "$Sname" ]; then echo -ne; elif [ -d "$x" ] || [ -e "$x" ]; then rar a -df -m0 -v"$SIZE"k "$x".rar "$x" fidone Quote Link to comment Share on other sites More sharing options...