- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how can i check space occupied by each user
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2002 08:14 AM
10-23-2002 08:14 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2002 08:19 AM
10-23-2002 08:19 AM
Re: how can i check space occupied by each user
Sandip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2002 08:19 AM
10-23-2002 08:19 AM
Re: how can i check space occupied by each user
# find dir_name -type f -user user_name | du -k | sort -rn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2002 08:20 AM
10-23-2002 08:20 AM
Re: how can i check space occupied by each user
for USER in "liste users"
do
find mydir -user $USER -exec du -sk {} \; | awk 'BEGIN{resu=0}{resu=resu+$1}END{print resu}'
done
Bye
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2002 08:22 AM
10-23-2002 08:22 AM
Re: how can i check space occupied by each user
find . -user $USER -exec du -sk {} \; | awk 'BEGIN{resu=0}{resu=resu+$1}END{print resu}'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2002 08:24 AM
10-23-2002 08:24 AM
Re: how can i check space occupied by each user
This will look for all files for one user and the display the usage summary in kilobytes. It will search sub directories also.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2002 08:33 AM
10-23-2002 08:33 AM
Re: how can i check space occupied by each user
man quota
man quotaed
This is one of them very under used features, which has multiple purposes and makes many things so easy.
Once you setup quotas, all the info is at a command prompt for you to grok.
You do NOT have to set hard or soft limits, so can use quotas for accounting purposes. However, you can set limits to reduce disk pigs effects on your system.
If Im feeling fiesty though, I'll change hard limits to 1K and listen to users complain for an hour ;)
Regards,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2002 08:37 AM
10-23-2002 08:37 AM
Re: how can i check space occupied by each user
If you have disk quota enabled on the file system, then use this command:
# quot with -f option
# man quot for details.
Another way is to find the total files owned by the user with the find -user command, then add it up with a script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2002 08:43 AM
10-23-2002 08:43 AM
Re: how can i check space occupied by each user
You may like to do a man diskusg and then list the usage user wise , also ther e is a small script to sort the same usage wise a tthe end of the man
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2002 08:56 AM
10-23-2002 08:56 AM
Re: how can i check space occupied by each user
First, I want the info about all the users using the directory ( and that includes a lot of them ... so I can't enter the names manually )
Second, I do not have root permissions on the machine.
Is it still possible ?
Sorry for not explaining that before ... I am a dumba** :-(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2002 08:57 AM
10-23-2002 08:57 AM
Re: how can i check space occupied by each user
This can be done easily in the following ways.
If you have all users in a single /home directory, Run this as root.
du -sk /home/*
This will give you each user's disk space utilization.
Regards,
Anil (Don't forget to assing points if answers are valuable to you)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2002 09:08 AM
10-23-2002 09:08 AM
SolutionIf you don't have root permissions on this machine, then the gathering of this information could be a mute point. If you don't have sufficient permissions to browse these directories then you might as well give up now.
You can't properly gather the size of files in directories where the files are shared amongst other users without reporting the same file over and over again.
I think you need to talk to your systems administrator regarding your concerns on filesystem usage.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2002 09:11 AM
10-23-2002 09:11 AM
Re: how can i check space occupied by each user
This may be of some help..
du -sk /home/* | sort -nr
this sorts the output numerically
and the output is in KB....
Thanks
Nag
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2002 09:12 AM
10-23-2002 09:12 AM
Re: how can i check space occupied by each user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2002 09:13 AM
10-23-2002 09:13 AM
Re: how can i check space occupied by each user
You can have the admin setup 1 of a couple things.
1. Sudo to give you root access to the find command.
* Then you could find all users files, make a script to sort the indes, add the sizes and get useage.
2. setup quotas. This may still require Sudo, but can be setup as a root cron job to mail you out put periodically to fullfill needs as well.
Regards,
Shannon