andygates: (Default)
andygates ([personal profile] andygates) wrote2006-06-13 04:00 pm

Geek question: file share sizes?

I have 2,500 user shares on an NTFS server, shared in the traditional hidden way with dollar-suffixes (\\myserver\agates$, etc). I need to list out the size of those shares so that some of my roving gonks can target the zero-size users. I could do it one-by-one, but I'd go mad, get RSI and cry. Anyone know of a script or (free) tool to do the job? Hyaena won't, alas...

[identity profile] gedhrel.livejournal.com 2006-06-13 04:29 pm (UTC)(link)
Think Ruth's got some scripts to do something like this. Otherwise, and assuming that your user shares live in predictable places on the server's drives, you might install cygwin and use the unix utilities (if that's a goer, reply and I'll tell you how).

The problem is that shares inherit and report the capacity of their parent filesystems, I think, so if your user shares all live under f:\users\agates and so on, you need to recursively descend into them to get a size report. If you're just looking for empty directories it's a bit simpler.
ext_55120: Wash Wacky Fun (Default)

[identity profile] esran.livejournal.com 2006-06-13 05:05 pm (UTC)(link)
There's at least one version of the GNU utils (including du which is what you'd use for this) compiled for Win32 without the need for cygwin. I think there's even a GNU one:

http://gnuwin32.sourceforge.net/

[identity profile] gedhrel.livejournal.com 2006-06-13 05:29 pm (UTC)(link)
Yup, and microsoft's own services for unix also include the tools.

[identity profile] arabis.livejournal.com 2006-06-14 08:55 am (UTC)(link)
I'm not sure whether I have a script for this or not. Will check for you.