Skip to content

Instantly share code, notes, and snippets.

@hamano
hamano / revB-case-v6.stl
Created June 21, 2021 05:43
revB-case-v6.stl█
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
npub1sccyq74jqx6t5l04a83d8h7cezt4765j5ztlws8p2ypy2tgv8sxsggcw4h
@hamano
hamano / dfree-btrfs.sh
Last active November 8, 2024 23:58
dfree-btrfs.sh
#!/bin/bash
declare -a res=($(sudo /usr/bin/btrfs qgroup show --raw -rF . | tail -1))
if [[ ${res[3]} == "none" ]]; then
declare -a res=($(df /fs | tail -1))
MAX=${res[1]}
FREE=${res[3]}
else
MAX=$((res[3] / 1024))
USE=$((res[2] / 1024))