Files
felhom.eu/documentation/audits/rehearsal-2026-10-20/tools/fill.sh
T

10 lines
753 B
Bash
Executable File

#!/bin/bash
# fill.sh — the family copies big files onto the „Teli" share until the disk is full (B6 #3). 10 GiB random each.
[ -f /root/work/big10g.bin ] || head -c 10737418240 /dev/zero | openssl enc -aes-256-ctr -nosalt -K $(printf '%064d' 7) -iv $(printf '%032d' 0) > /root/work/big10g.bin
for i in $(seq 1 25); do
out=$(smbclient //felhom.tester4.test/Teli -U felhom --password="$PW" -m SMB3 -c "put /root/work/big10g.bin toltelek_$i.bin" 2>&1 | grep -v "^Try" | tail -1)
echo "$(date -u +%T) put $i: $out"
case "$out" in *NT_STATUS_DISK_FULL*|*No\ space*|*ERRDOS*|*NT_STATUS*) echo "$(date -u +%T) STOP: the share refused"; break;; esac
done
smbclient //felhom.tester4.test/Teli -U felhom --password="$PW" -m SMB3 -c "du" 2>&1 | tail -2