2

Say there is shared unit that has allocated space to run some analytics, there is not really a limit per user however it has to be often monitored so the user don't leave "trash" that might consume space. What I want to do is to list all the folders within that directory, but also include the owner and the size of the directory.

Right now I use

df /server/shared/alloc

and the output is:

Filesystem    512-blocks      Free %Used    Iused %Iused Mounted on
/dev/work    1027604480 302184640   71%     6877     1% /server/shared/alloc

But this will only give me the % used instead of what I asked before.

Sorry if this is a noobie question, i'm not really a sys admin just want to be able to monitor so I can email the users that take a lot of space.

2 Answers 2

3

There isn't a single command that provides all the information you want. You can either write a script or use a combination of

  du /server/shared/alloc
  find /server/shared/alloc -type d -ls

The first will give you the total disk usage for (all the files in) each folder and subfolder

The second will give you the ownership of the folders and folders (but not the ownership of the files in those folders)

Note that a directory has a size (related to the number of files in it) that is different from the size of it's contents.

I use the following words interchangeably: folder; subfolder; directory; subdirectory.

3

If you set up quotas (any value is fine, even setting the whole volume as a limit) then you can use quota to display usage information by the users.

5

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .