This is a real world problem so I think you might found this interesting. We have servers which are shared by multiple team members. Each team member has its own user id and home directory. Now with time each user starts creating files which in end caused the disk to be full.
Now for creating a build (something like make), some 500 MB is needed. But now anyone who has to create the buid, has to find the file and request that user to remove the files.
How does the user find the files consuming al the space?
We have been using multiple commands like df, du, find. But till now I have not find an easy and quick way to find the files which is taking up most of the disk space.
Have a look at the find command. Assuming that your users' home directories are all in /home, you could try:-
find /home -type f | xargs ls -l | sort -bn +4
This will long list off every file (assuming that the user can read all the directories) then sort them on size. Just check that the byte value is indeed in column 5 (skip 4 columns on the sort)
If it just gets too big a list, grow you command to:-
find /home -type f | xargs ls -l | sort -bn +4 | tail -50
to hopefully just get the important chunk, i.e. the largest 50 files.
Does that help?
If I've missed the point, let me know and I will think again.
i have run that cmd in ssh but i getting an errror that +4 in sort is an invalid filename ,it means the sort is not taking it as a option pls,
see what u can do in this regard or any alternate way to do this