- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: which user uses maximum disk space
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
08-21-2005 03:04 PM
08-21-2005 03:04 PM
I want to find out which user is using maximum disk space in /home directory file system.
Can anyone tell which command i should use ?
Thanks,
Shiv
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2005 03:09 PM
08-21-2005 03:09 PM
Re: which user uses maximum disk space
du -ks *
This will show you the sizes of each directory (which is users home directory) with their sizes in KB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2005 03:23 PM
08-21-2005 03:23 PM
Re: which user uses maximum disk space
# /usr/sbin/quot /home
It will produce disk usage in KB for each user sorted with top users first.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2005 03:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2005 04:12 PM
08-21-2005 04:12 PM
Re: which user uses maximum disk space
quot is the best way to find out this. Allthough all of the above solutions works to some extent.
But apparently it seems your /home is the only worry for you at this time as you are posting several questions related to this at present. Could you attach "bdf" output and "vgdisplay -v vg00" output.
HTH,
Devender
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2005 06:46 PM
08-21-2005 06:46 PM
Re: which user uses maximum disk space
i often use to determine max using /home
users and warn them like;
cd /home;
du -ks * |sort -n
and if i want to warn them to delete their
unnecessary files then;
#!/usr/bin/ksh
cd /home;
if [ $? -ne 0 ]
then
echo "/home not found..."
exit 1
fi
for user in `du -ks * |sort -n|tail -10|awk '{print $2}'`
do
echo "Please clean your unnecessary files!!!Contact Shivkumar"|mailx -s "home dir usage" $user@mail_address
done
Above the script;last 10 top disk usage users
will be inform via e-mail
Good Luck,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2005 07:08 PM
08-21-2005 07:08 PM
Re: which user uses maximum disk space
#!/bin/ksh
total=$(find /home/ -user root | xargs ls -l | awk 'BEGIN {size=0;}{size+=$5;}END{print size;}')
echo "root user is using $total size in /home"
for user in `ls /home/ | grep -v 'lost+found'`
do
id $user 1>/dev/null 2>&1
if [[ $? -eq 0 ]]
then
total=$(find /home/ -user $user | xargs ls -l | awk 'BEGIN {size=0;}{size+=$5;}END{print size;}')
echo "$user is using $total size in /home"
fi
done
hth.