Lemme try to put is as simply as I can.
I have a directory named TEMP. Within that there are directories Temp1, Temp2, Temp3 and so on.
Now all these sub directories are created either by User1, User2 or User3 (or may be more).
How do I calculate the space used by each user (or should I say the sub directories created by the users) ?
I tried using the du but I am not finding a way to do that for individual users.
My primary motive is to find the space occupied by each individual user.
Pointer ?
Calling UNIX Gurus. Need help with a small query
Started by Vasishta.Sushant, Oct 09 2009 04:41 PM
5 replies to this topic
#1
Posted 09 October 2009 - 04:41 PM
#2
Posted 09 October 2009 - 05:39 PM
one doubt..
are the user dirs one level or multi level
ie do u have dirs inside temp1..
if its single level then its simple...
if not ..you have a task in hand..
are the user dirs one level or multi level
ie do u have dirs inside temp1..
if its single level then its simple...
if not ..you have a task in hand..
#3
Posted 09 October 2009 - 10:04 PM
#4
Posted 09 October 2009 - 11:01 PM
ls-l and then awk? forgot exact commands :ashamed:
#5
Posted 09 October 2009 - 11:55 PM
du -ch | grep total
(that is for each directory, dunno how to do it for all directories)
(that is for each directory, dunno how to do it for all directories)
#6
Posted 20 October 2009 - 09:34 AM
Try something like
$ for u in user1 user2 user3; do find TEMP -user $u -print0 | xargs -0 du -ch; done
Sign In
Create Account
Back to top









