Help with a plot moving script on Linux

Hello everyone!

I am currently running a script I got from another member (pasted below) while plotting, but I was wondering if there was a way to adjust it to copy to multiple destination directories instead of just 1. For example, I would like to fill 3 HDD’s at a time, so either a script that can alternate the HDD’s it copies to one at a time (HDD1 then HDD2 then HDD3), or switches to another HDD once one is full. Either one would work fine for me, I just want to be able to copy to multiple HDD’s so I don’t have to manually switch the script daily.

Any help would be greatly appreciated!


# Watches for newly created plots and moves them to farmer 1 by 1.
# Requires inotify-tools: sudo apt-get install -y inotify-tools

# Directory paths
# Limit transfer speed to minimise long lookup times whilst farming.

echo "Watching for new plots in: $SRCDIR"
echo "Copying plots to: $DESTDIR"

inotifywait -m $SRCDIR -e create -e moved_to |
while read path action file; do
    if [[ "$file" =~ .*plot$ ]]; then
        echo "Found new plot!"
        echo "Copying plot to $DESTDIR"
        rsync --bwlimit="$BWLIMIT" --preallocate --remove-source-files --skip-compress=plot --whole-file -avP "$SRCDIR/$file" "$DESTDIR/$file"
        echo -e "Copy complete, waiting for new plots...\n"

They’re something that will help you.
And give u desired effect if implemented properly.


Mount multiple hard drives to a singular mount point.

Mhddfs will fill the drives and is configurable further…

Personally I just set a cron to cp *.plot. Ever 20 minutes.

Take care