This is [related](https://serverfault.com/questions/228852/how-does-one-determine-active-ssh-and-samba-connection-counts) to an effort to shutdown a seldom used server if there are no SSH connections or open files. 

How can I determine in a shell script (cron job on a Linux box) if any of the current samba shares have any open files?