-2

I need to get a list of the Top 15 users (storage) in every mount. I am able to get the mount level information but I am not able to get the top users in every mount. I can see the nested folders in every mount.

For example; If I look to mount A, in this I could see folder A folder B folder C and again in each folder i,e Folder A i could more folders A1 A2. This is where my data sets/files are available.

Totally i have around 20 mount point (approx).

OS: Solaris

SAM
  • 1

1 Answers1

0
#!/bin/bash
for U in $(cut -d: -f1 /etc/passwd) ; do
    C=$(find / -type f -user $U -print0 | du -c --files0-from=- | tail -n 1 | cut -f1 )
    echo $C $U
done | sort -nr

This assumes local users and shows the size grouped by file owner which is as close to what you want as possible givin the ambiguity of the question.

https://serverfault.com/questions/632017/solaris-how-to-see-if-bash-is-installed

Solaris default install (user tools)

https://www.opencsw.org/packages/findutils/

user1133275
  • 5,574