Given a directory d
and a list of users, I want to find disk space used by each user in directory d
.I cannot install any utility as it's a production environment so need a result using standard LINUX command(s)
Asked
Active
Viewed 4,386 times
3 Answers
1
The following shell script will get the disk usage, in human readable form (-h
), sort the results and deliver the top 10 values:
sudo du -Sh | sort -rh | head -10

Bob Dalgleish
- 8,167
- 4
- 32
- 42

Akash Bhandari
- 61
- 6
0
You can try -
du -shc /home/*
Where,
s :- display total size of a file or total size of all files in a directory.
h :- human readable format.
c :- display a total size usage at the end of result.

Khilesh Chauhan
- 739
- 1
- 10
- 36