16 lines
377 B
Bash
Executable File
16 lines
377 B
Bash
Executable File
#!/bin/bash
|
|
|
|
file="${1}"
|
|
|
|
while read a
|
|
do snapshot=$(echo ${a%%/$file})
|
|
printf '%s' "btrfs property set ${snapshot} ro false"
|
|
printf '%s' "rm --force -- ${a}"
|
|
printf '%s' "btrfs property set ${snapshot} ro true"
|
|
#btrfs property set "${snapshot}" ro false
|
|
#rm --force -- "${a}"
|
|
#btrfs property set "${snapshot}" ro true
|
|
done < <(find /.snapshots/ -name "${file}")
|
|
|
|
exit 0
|