Created
July 21, 2021 07:43
-
-
Save runapp/c1061572fc158e83d15d187bdf5fa998 to your computer and use it in GitHub Desktop.
Enable quota on btrfs, creating subvolume for every user and then
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allusers=$(cat) | |
for i in $allusers ; do | |
mv $i ==$i && \ | |
btrfs subvol create $i && \ | |
chown --reference===$i $i | |
done | |
for i in $allusers ; do | |
cp -a --reflink=always ==$i/. $i | |
#pushd ==$i && \ | |
#find . -mindepth 1 -maxdepth 1 | while read j; do | |
# echo $i/$j | |
# cp -a --reflink=always $j ../$i/$j | |
#done | |
#popd | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment