This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo "Error - Usage: $0 <parent-id>" | |
exit 1 | |
fi | |
set -eu | |
# set -x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# vim:set fileencoding=utf-8 sw=2 ai: | |
# downloaded from https://gist.github.com/tcchau/4628317 | |
# ... which is a fork from https://gist.github.com/sgk/1286682 | |
import sqlite3 | |
import datetime | |
import re | |
# additional imports --ah |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Arg 1: -rf | |
# Arg 2: /testbtrfs/backups/hourly.4/ | |
# echo 1: $1 2: $@ | |
# Try to delete the given path with btrfs subvolume delete first | |
# Check if inode number == 256 (all subvolumes have inode number 256) | |
if [ "$1" = "-rf" -a "$3" = "" -a $(stat --printf='%i' $2) -eq 256 ]; then |