rwx/sh/alias/btrfs.sh
2024-11-18 14:35:14 +01:00

73 lines
1.2 KiB
Bash

bfdf() { sh_a__btrfs_filesystem_d_f "${@}"; }
sh_a__btrfs_filesystem_d_f() {
btrfs \
filesystem \
df \
"${@}"
}
bfdu() { sh_a__btrfs_filesystem_d_u "${@}"; }
sh_a__btrfs_filesystem_d_u() {
btrfs \
filesystem \
du \
--summarize \
"${@}"
}
bfu() { sh_a__btrfs_filesystem_usage "${@}"; }
sh_a__btrfs_filesystem_usage() {
btrfs \
filesystem \
usage \
"${@}"
}
bpg() { sh_a__btrfs_property_get "${@}"; }
sh_a__btrfs_property_get() {
btrfs \
property \
get \
"${@}"
}
bsc() { sh_a__btrfs_subvolume_create "${@}"; }
sh_a__btrfs_subvolume_create() {
btrfs \
subvolume \
create \
"${@}"
}
bsd() { sh_a__btrfs_subvolume_delete "${@}"; }
sh_a__btrfs_subvolume_delete() {
btrfs \
subvolume \
delete \
"${@}"
}
bsl() { sh_a__btrfs_subvolume_list "${@}"; }
sh_a__btrfs_subvolume_list() {
if [ -n "${1}" ]; then
btrfs subvolume list "${1}" |
cut --delimiter " " --fields 9 |
sort
fi
}
bss() { sh_a__btrfs_subvolume_snapshot "${@}"; }
sh_a__btrfs_subvolume_snapshot() {
btrfs \
subvolume \
snapshot \
"${@}"
}
bssr() { sh_a__btrfs_subvolume_snapshot_r "${@}"; }
sh_a__btrfs_subvolume_snapshot_r() {
btrfs \
subvolume \
snapshot -r \
"${@}"
}