This is a simple bash script for managing ZFS Datasets. The script generates a list of ZFS datasets under a specific source directory and lists all regular directories under a parent dataset.
- Set
source_dataset
to your source dataset (default example isdarkmatter_disks/domains
). - Run the script to list all ZFS datasets and regular directories.
- The script prints the retrieved datasets. If no datasets are found, it will print "There are no datasets".
- The script then finds all directories (only one level deep) under the dataset path.
- After that, it prints all the folders that are not ZFS datasets. If there are no such folders, it will print "There are no folders".
The script currently only supports a one-level depth directory structure under the dataset path.
Contributions are welcome. Feel free to open a pull request with improvements.