User size used


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers User size used
# 1  
Old 07-22-2014
User size used

I would like to check the used size of all user login ID , I tried the command du -a , du -h , it seems can only find the current directory , If I would like to list all user ( the user list in /etc/passwd ) its used space , from largest to smallest , would advise what can I do ? thanks

The user directory is as below , therefore , it is not possible to run du -a from /home .
/home/EDP/user1
/home/EDP/user2
/home/EDP/user3
/home/ACC/user4
/home/ACC/user5
/home/ACC/user6
/home/MKT/user7
/home/MKT/user8
/home/MKT/user9
# 2  
Old 07-22-2014
Dear ust3,
I have a few to questions pose in response first:-
  • Is this homework/assignment? There are specific forums for these.
  • Are you looking for all files owned by these users or just those in their home directories?
  • What have you tried so far?
  • What output/errors do you get?
  • What OS and version are you using?
  • What are your preferred tools? (C, shell, perl, awk, etc.)
  • What logical process have you considered? (to help steer us to follow what you are trying to achieve)
Most importantly, What have you tried so far?

There are probably many ways to achieve most tasks, so giving us an idea of your style and thoughts will help us guide you to an answer most suitable to you so you can adjust it to suit your needs in future.


We're all here to learn and getting the relevant information will help us all.



Regards,
Robin
# 3  
Old 07-22-2014
Did you consider du -a --max=0 /home/*?
# 4  
Old 07-22-2014
Quote:
Originally Posted by RudiC
Did you consider du -a --max=0 /home/*?
thanks reply ,

if use this method , it only check the size of /home directory but not the individual directory size of each user , is it ? thanks
# 5  
Old 07-23-2014
hi,

du -k | sort -nr


hope it helps!

regards,
fspalero

Moderator's Comments:
Mod Comment edit by bakunin: please use CODE-tags when posting code or terminal output. Thank you.

Last edited by fspalero; 07-23-2014 at 06:28 AM..
# 6  
Old 07-23-2014
Code:
cd /home
du -sk */* | sort -n

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Cannot set 'soft limits' for 'maximum stack size' for a standard user

Hi Guys, I'm trying to install Oracle Database on to Oracle Linux 7.6 but when the database install package checks the OS set-up, it keeps on failing on the soft limits for the stack. It's default value is 8192 but I'm trying to set it to 10240. This is what I added to... (2 Replies)
Discussion started by: ASGR
2 Replies

2. Shell Programming and Scripting

Find the total size of all directories that are owned by a particular User

Hi All, I am writing a script in which i need find the total size of all the directories that are present in a directory which are owned by a particular user. I will explain in details i have a dir DIR1 in which i have 5 dir's DIRA DIRB DIRC DIRD DIRE. DIRA DIRC DIRE are owned by "eswar" i... (2 Replies)
Discussion started by: firestar
2 Replies

3. Shell Programming and Scripting

The scripts not able to make the file to size 0, every times it go back to its original size

#!/bin/sh ########################################################################################################## #This script is being used for AOK application for cleaning up the .out files and zip it under logs directory. # IBM # Created #For pdocap201/pdoca202 .out files for AOK #1.... (0 Replies)
Discussion started by: mridul10_crj
0 Replies

4. UNIX for Dummies Questions & Answers

Limiting User mailbox size in /var/spool

How can one limit the size of user mailboxes in /var/spool/mail? (0 Replies)
Discussion started by: proactiveaditya
0 Replies

5. Shell Programming and Scripting

Filter the file list greater then the size specified by user

HI, Can any tell me how to filter the list of files greater than the size specified by user. The size should be provided by user as an input. Regards shiva (6 Replies)
Discussion started by: shivu
6 Replies

6. Solaris

command to find out total size of a specific file size (spread over the server)

hi all, in my server there are some specific application files which are spread through out the server... these are spread in folders..sub-folders..chid folders... please help me, how can i find the total size of these specific files in the server... (3 Replies)
Discussion started by: abhinov
3 Replies

7. AIX

To find RAM Size in AIX as normal user?

Hi, Am jus trying to find the Total RAM Size of a AIX m/c (in MB)..svmon works perfectly for a superuser...But i want to achive this as a normal user...Please help me out with correct command.. Best Regards, Muthukumaran.M (3 Replies)
Discussion started by: muthukumaran13
3 Replies

8. AIX

User unable to create a file over 2 GB's in size

Hello, this is my first post. I have a user who cannot create a file over 2 GB's in size eventhough the FS is large file enabled and I added a special stanza in /etc/security/limits to allow an unlimited file size for this particular user (user1 - see below). ibm:/home/root (4062)#cat... (7 Replies)
Discussion started by: AIXtexas
7 Replies

9. Shell Programming and Scripting

How to get memory size in HP and not as user root?

Hi falks, I'm trying to get the momory size in HP-UX as user oracle. The command to do it is: /usr/sbin/dmesg | grep "Physical" | awk '{print $2}' The problem is that only user root can run this command and i need to run it as user oracle. Do you know another way to get the memory size in HP... (2 Replies)
Discussion started by: nir_s
2 Replies

10. UNIX Desktop Questions & Answers

Size Limitation for a user directory

Hi all, I want to set a size limitation for some user in the system, for an example, each user only have 5MB free space in the system. The user cannot user more than 5 MB space. Is it possible to do this? Thanks! (1 Reply)
Discussion started by: felix_koo
1 Replies
Login or Register to Ask a Question