Operating System - HP-UX
1821667 Members
3593 Online
109635 Solutions
New Discussion юеВ

Re: who is using the space

 
SOLVED
Go to solution
Carol Garrett
Trusted Contributor

who is using the space

I want to search all the way down/through a large filesystem and total up who is using how much space. How to do it ?
9 REPLIES 9
John Palmer
Honored Contributor

Re: who is using the space

du -k will give you a list subdirectories and how big they are in kilobytes.

Is this what you require?
Stefan Farrelly
Honored Contributor
Solution

Re: who is using the space


diskusg /dev/vgxx/lvolxx | sort -nbk 3

This will give you a list of all userids and how many blocks they are using throughout the lvol/filesystem. The size is in 512byte blocks so divide by 2 for size in K, eg;

diskusg /dev/vg00/lvol5 | sort -nbk 3

108 tvt1 2945
109 tvt2 100223

user tvt2 is actually using 50Megabytes and tvt1 only 1.5Mb
Im from Palmerston North, New Zealand, but somehow ended up in London...
Andy Monks
Honored Contributor

Re: who is using the space

If all the files are under the users own directories, then just do :-

cd /home
du -sk *

If not, then it's hard work.

You'd need a script to do a find and then add up the info.

or you could turn quota's on to do it for you.
Patrick Wessel
Honored Contributor

Re: who is using the space

May be it's not the most sophisticate way, but a:
du | sort -nr | more

shows you all files sorted by the size
There is no good troubleshooting with bad data
James R. Ferguson
Acclaimed Contributor

Re: who is using the space

Carol:

Use the quot command. See the man pages. 'quot' gives a good summary by user (account).

...JRF...

Re: who is using the space

use quot
Sundar
Maarten van Maanen
Regular Advisor

Re: who is using the space

Please note you can use diskusg and vxdiskusg for accumulating diskspace per user.
Diskusg vor HFS and vsdiskusg vor FXFS-filesystems.

Re: who is using the space

You can use find command with -size n , -atime n and -mtime n option to check larger file creation in specific period and you can also use for du command.
MANOJ SRIVASTAVA
Honored Contributor

Re: who is using the space

Use diskusg ( vxdisusg for vxfs ) file systems .

diskusg ( all the mounted systems ) >> filename

then again use diskusg -s filename | sort +2n -r

this will give the output in descending order . One intresting feature is to use diskusg -s command again on the file as it adds up all the space for same users on different file systems .

Example in the man pages of diskusg does the same.