These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for list user on the new forum.
This website is deprecated, and remains online only for historic access to old issues and docs for historic versions of Virtualmin. It has been unmaintained for several years, and should not be relied on for up-to-date information. Please visit www.virtualmin.com instead.
Are you hoping to see a list of all Virtual Server owners?
To see all Virtual Server owners, you could use a command such as "virtualmin list-domains" to list all domains and admins in Virtualmin.
Then, to grab just the admins, which is the second column of that output, you can use "awk". And finally, since there could be duplicates in that output, the command "uniq" will remove all duplicates, so admins are only in there once.
Howdy,
Are you hoping to see a list of all Virtual Server owners?
To see all Virtual Server owners, you could use a command such as "virtualmin list-domains" to list all domains and admins in Virtualmin.
Then, to grab just the admins, which is the second column of that output, you can use "awk". And finally, since there could be duplicates in that output, the command "uniq" will remove all duplicates, so admins are only in there once.
The final command would look something like this:
virtualmin list-domains | awk '{print $2}' | uniq
thank you!
so, the script should to be
virtualmin list-domains | awk '{print $2}' | uniq
for i in *; do
rsync --recursive -avz /home/$i/ /backup/$i/
done
thank you