I want to know if there is any posibility to find out - on an AIX system - which are the the users who consume most space or at least a posibility to obtain a list with all the users and how much space are they consuming ?
Thank you! The command works indeed, but I need to find out how much space consumes each of the top 6 users from another directory, not their own space from /home.
The AIX machine we are talking about is shared between more users. Each of them has his own working directory (/home/userid), but here there is no problem because this quota is limited.
Besides this space, the users have also access in another directory(ies) where they create some "views" which consume the available disk space. I need to find out the users who consume the most of it.
The list of the users can be "loaded" from /home directories list.
for user in user1 user2 user3 user4 user5 user5 user6
do
total=`find / -user ${user} -exec ls -l {} \;| awk '{print x+=$5/1024}' | tail -1`
echo "${user} used ${total} KBs on system `uname -n` "
done
# That should give you everything that you wanted. I have only access to an hpux system at the moment, please check if 5th column is size on a aix system ( ls -l )