File size: 637 Bytes
8ca7ffa | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #!/bin/bash
# Remove per-frame PNG dirs from batch outputs (keep videos), except the two
# demo episodes that intentionally keep frames. Also drop stereo MP4s in data/.
# Safe to re-run.
KEEP1="TRI+52ca9b6a+2023-11-27-10h-39m-12s"
KEEP2="RAIL+80edfcb1+2023-04-12-15h-49m-43s"
OUT=/home/wujiayir/robot_tools/droid/out
DATA=/home/wujiayir/robot_tools/droid/data
find "$OUT" -mindepth 3 -maxdepth 3 -type d \
\( -name render -o -name mask -o -name normal \) \
! -path "$OUT/$KEEP1/*" ! -path "$OUT/$KEEP2/*" \
-exec rm -rf {} + 2>/dev/null
find "$DATA" -name "*stereo*" -type f -delete 2>/dev/null
echo "cleanup done $(date)"
|