added mount_subvolume

master
David Kebler 2023-12-15 10:23:44 -08:00
parent b9f98d36f4
commit 2d61144804
1 changed files with 7 additions and 1 deletions

View File

@ -91,4 +91,10 @@ sudo /bin/find $1 -maxdepth $2 -type d -exec sh -c '
# for d do # for d do
# btrfs subvolume show "$d" >/dev/null 2>&1 && printf "%s\n" "$d" # btrfs subvolume show "$d" >/dev/null 2>&1 && printf "%s\n" "$d"
# done # done
# ' find-sh {} + \) \) # ' find-sh {} + \) \)
mount_subvolume () {
mkdir -p $3
echo msudo mount $1 -o subvol=$2 $3
sudo mount $1 -o subvol=$2 $3
}