Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ $# -ne 2 ];
- then
- echo "setquota size target_directory"
- exit;
- fi
- if [ ! -d "$2" ];
- then
- echo $2" is not a directory";
- exit;
- fi
- size=$1;
- target_dir=$2;
- cd $target_dir;
- for d in `ls -d */`
- do
- cmd="zfs set userquota@"${d%?}"="$size" "tank/home
- echo $cmd;
- $cmd;
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement