You can use below command to check how much space is consumed by a specific user (‘testuser’ in this case).
$ cd / $ find . -user testuser -type f -exec du -k {} ; | awk '{ s = s + $1 } END { print "Total used: ", s }' Total used: 5322333
You can easily convert this to GB with the following commands.
$ bc bc 1.06 Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. 5322333/2^20 5 quit
So, in this case, ‘testuser’ consumed about 5GB of space.
Leave a Reply