- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Disk Space Used
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
07-19-2006 10:00 AM
07-19-2006 10:00 AM
this is my home directory... /export/home/emp1001
like wise many employees will have their own
home dirs. how to get following report. it needs to consolidate at the home dir level.
/export/home/emp1001 201MB
/export/home/emp1002 25MB
/export/home/emp1003 600MB
/export/home/emp1004 100KB
Also if i want to see only those used more than 250MB space.
should return
/export/home/emp1003 600MB
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2006 10:08 AM
07-19-2006 10:08 AM
Re: Disk Space Used
# du -xk /export/home | sort -k2
...summarizes in 1k blocks
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2006 10:12 AM
07-19-2006 10:12 AM
Re: Disk Space Used
/export/home>du -xk /export/home | sort -k2
du: illegal option -- x
usage: du [-a][-d][-k][-r][-o|-s][-L] [file ...]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2006 10:14 AM
07-19-2006 10:14 AM
Re: Disk Space Used
The following options are supported for /usr/xpg4/bin/du
only:
-r By default, generate messages about directories that
cannot be read, files that cannot be opened, and so
forth.
-x When evaluating file sizes, evaluate only those files
that have the same device as the file specified by the
file operand.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2006 10:27 AM
07-19-2006 10:27 AM
Re: Disk Space Used
What release are you running?
In any event:
# du -ks /export/home/*
...is closer to what you first asked about.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2006 11:02 AM
07-19-2006 11:02 AM
Re: Disk Space Used
Can i get the result in Mega Bytes ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2006 11:25 AM
07-19-2006 11:25 AM
Re: Disk Space Used
# du -ks /export/home/* | awk '{printf "%8.2f %s\n",$1/1024,$2}'
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2006 04:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2006 03:11 AM
07-20-2006 03:11 AM
Re: Disk Space Used
Quote:
--------
Untested...
# du -ks /export/home/* | awk '{mb=$1/1024; total += mb; if (mb>250) {printf "%8.2f %s\n",mb,$2}} END {'printf "%8.2f total",total}'
Cheers,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2006 03:53 AM
07-20-2006 03:53 AM
Re: Disk Space Used
The accidental single quote after END { causes the awk program to terminate and the intended terminator quote makes the shell read some more.
Try:
# du -ks /export/home/* | awk '{mb=$1/1024; total += mb; if (mb>250) {printf "%8.2f %s\n",mb,$2}} END {printf "%8.2f total",total}'
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2006 04:51 AM
07-20-2006 04:51 AM
Re: Disk Space Used
1) I bet you are on a SUN
2) perhaps there are no homes around exceeding your limit -> set it at 25MB for testing
3) you may come into NFS territory - perhaps you have to check this and exclude them (better run your checker locally).
mfG Peter