Skip to content

Instantly share code, notes, and snippets.

@GodTamIt
GodTamIt / btrfs-scrub-individual.py
Last active February 21, 2024 15:15
btrfs-scrub-individual.py
#! /usr/bin/env python3
import argparse
import re
import subprocess
import sys
from typing import List, NoReturn, Set
PATH_REGEX = re.compile("path\s+(?P<path>[^\s]+)")
#!/usr/bin/env bash
# ~/.macos — https://mths.be/macos
# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
# Ask for the administrator password upfront
sudo -v