dotfiles/.config/zsh/functions/btrfs-snapshot-compare
2022-05-15 12:00:34 +02:00

13 lines
264 B
Bash
Executable File

#!/usr/bin/env zsh
# Compare 2 Btrfs snapshots
setopt LOCAL_OPTIONS ERR_RETURN NO_UNSET PIPE_FAIL
autoload -U die
[[ ${ARGC} -ne 2 ]] && die 1 "usage: ${0} <old> <new>"
local old=${1}
local new=${2}
btrfs send --no-data -p ${old} ${new} | btrfs receive --dump