PencilHu/hubin-nfs-full / SFI-300K /unzip_all_sfi.sh
PencilHu's picture
download
raw
985 Bytes
#!/usr/bin/env bash
# 顺序解压 SFI-300K:先等 caption.zip 解压结束,再解压全部 video 分卷
set -u
BASE="/nfs/hubin/SFI-300K"
cd "$BASE" || exit 1
LOG="$BASE/unzip_sfi_full.log"
exec >>"$LOG" 2>&1
echo "======== $(date -Is) START unzip_all_sfi ========"
# 等待正在进行的 caption 解压(若有)
while pgrep -af 'unzip.*caption\.zip' | grep -v 'unzip_all_sfi' >/dev/null 2>&1; do
echo "$(date -Is) waiting for caption.zip unzip to finish..."
sleep 15
done
if [[ -f caption.zip ]] && [[ ! -d caption ]]; then
echo "$(date -Is) extracting caption.zip"
unzip -q -o caption.zip
fi
shopt -s nullglob
videos=(video-SFI-300K_*.zip)
echo "$(date -Is) video archives: ${#videos[@]} files"
for z in "${videos[@]}"; do
echo ""
echo "=== $(date -Is) BEGIN $z ==="
if unzip -q -o "$z"; then
echo "=== $(date -Is) OK $z ==="
else
echo "=== $(date -Is) FAIL $z (exit $?) ==="
fi
done
echo "======== $(date -Is) DONE unzip_all_sfi ========"

Xet Storage Details

Size:
985 Bytes
·
Xet hash:
2211ccd55b5a67b217a74bf632315bda62c10085fe32c0f89ced210720eb51a0

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.