I am a non admin user of a linux server, where multiple users/employees store data. When we run out of disk space (i.e. when we notice data transfer failure etc..), someone of us runs a df command to determine that there is an actual lack of space:
df -h /store/*
This is followed by a du command to determine top users, which are then "requested" publicly to optimize their usage:
du -hs /store/dir1 | sort -h
Now, on another server (say newstore, where we usually didn't have issues until now!) we have multiple directory structures within the same "appliance/cluster", which necessitates multiple runs of du
du -hs /newstore/dir1 | sort -h
du -hs /newstore/dir2/levelchange | sort -h
du -hs /newstore/dir3/new/old | sort -h
Then I copy the output to excel and "stitch" together a userwise view. I'm looking for a simpler solution.
This process has to be done by a non-admin user with standard privileges (as admin is remote and frankly we won't know her/him); thus it would not be possible to install additional programs.
I'm looking for a solution where, I can get information storage used by each user/owner, aggregated across the multiple directories, where I would just specify the top level directory (In this case /newstore).
Linux version of server: Red Hat Enterprise Linux
Edit 1: Each directory has a user as owner, one user may have multiple directories.
du -hs /newstore/dir1
. Or maybe show part of the output?du
commands you posted should return a single line, why would you sort that? And it is not very clear (to me) how you tie that to specific users. Or does each user own one of the dir1/dir2/...?