rwx/sh/alias/btrfs.sh

74 lines
1.1 KiB
Bash
Raw Permalink Normal View History

2024-11-19 13:42:11 +00:00
bfdf() { a__btrfs_filesystem_d_f "${@}"; }
a__btrfs_filesystem_d_f() {
2024-11-16 15:48:48 +00:00
btrfs \
filesystem \
df \
"${@}"
}
2024-01-05 08:49:18 +00:00
2024-11-19 13:42:11 +00:00
bfdu() { a__btrfs_filesystem_d_u "${@}"; }
a__btrfs_filesystem_d_u() {
2024-11-16 15:48:48 +00:00
btrfs \
filesystem \
du \
--summarize \
"${@}"
}
2024-01-05 08:49:18 +00:00
2024-11-19 13:42:11 +00:00
bfu() { a__btrfs_filesystem_usage "${@}"; }
a__btrfs_filesystem_usage() {
2024-11-16 15:49:41 +00:00
btrfs \
filesystem \
usage \
"${@}"
}
2024-01-05 08:49:18 +00:00
2024-11-19 13:42:11 +00:00
bpg() { a__btrfs_property_get "${@}"; }
a__btrfs_property_get() {
2024-11-16 15:55:31 +00:00
btrfs \
property \
get \
"${@}"
}
2024-01-05 08:49:18 +00:00
2024-11-19 13:42:11 +00:00
bsc() { a__btrfs_subvolume_create "${@}"; }
a__btrfs_subvolume_create() {
2024-11-16 15:53:19 +00:00
btrfs \
subvolume \
create \
"${@}"
}
2024-01-05 08:49:18 +00:00
2024-11-19 13:42:11 +00:00
bsd() { a__btrfs_subvolume_delete "${@}"; }
a__btrfs_subvolume_delete() {
2024-11-16 15:53:19 +00:00
btrfs \
subvolume \
delete \
"${@}"
}
2024-01-20 22:40:49 +00:00
2024-11-19 13:42:11 +00:00
bsl() { a__btrfs_subvolume_list "${@}"; }
a__btrfs_subvolume_list() {
2024-11-18 11:41:54 +00:00
if [ -n "${1}" ]; then
btrfs subvolume list "${1}" |
cut --delimiter " " --fields 9 |
sort
fi
}
2024-11-19 13:42:11 +00:00
bss() { a__btrfs_subvolume_snapshot "${@}"; }
a__btrfs_subvolume_snapshot() {
2024-11-16 15:53:19 +00:00
btrfs \
subvolume \
snapshot \
"${@}"
}
2024-01-05 08:49:18 +00:00
2024-11-19 13:42:11 +00:00
bssr() { a__btrfs_subvolume_snapshot_r "${@}"; }
a__btrfs_subvolume_snapshot_r() {
2024-11-16 15:53:19 +00:00
btrfs \
subvolume \
snapshot -r \
"${@}"
}