fs-diff.sh (511B)
1 #!/usr/bin/env bash 2 # fs-diff.sh 3 set -euo pipefail 4 5 OLD_TRANSID=$(sudo btrfs subvolume find-new /mnt/root-blank 9999999) 6 OLD_TRANSID=${OLD_TRANSID#transid marker was } 7 8 sudo btrfs subvolume find-new "/mnt/root" "$OLD_TRANSID" | 9 sed '$d' | 10 cut -f17- -d' ' | 11 sort | 12 uniq | 13 while read path; do 14 path="/$path" 15 if [ -L "$path" ]; then 16 : # The path is a symbolic link, so is probably handled by NixOS already 17 elif [ -d "$path" ]; then 18 : # The path is a directory, ignore 19 else 20 echo "$path" 21 fi 22 done