- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Something similar to "du -sh'
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
01-15-2007 10:37 PM
01-15-2007 10:37 PM
Something similar to "du -sh'
On a linux machine:
$ du -sh ./
405M ./
Above gives disk usage in human readable format in Linux.
Do we have anything similar in HP-UX ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2007 10:46 PM
01-15-2007 10:46 PM
Re: Something similar to "du -sh'
# du -ks
Calculates the block count in 1024-byte (kilobytes) units rather than the default 512-byte units.
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2007 10:50 PM
01-15-2007 10:50 PM
Re: Something similar to "du -sh'
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2007 10:51 PM
01-15-2007 10:51 PM
Re: Something similar to "du -sh'
HP-UX isn't "human readable",
at least in this respect.
You would have to increase readbility by yourself, like e.g.
$ du -skx /opt|awk '{print$1/2^10}'
3094.95
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2007 11:05 PM
01-15-2007 11:05 PM
Re: Something similar to "du -sh'
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2007 11:18 PM
01-15-2007 11:18 PM
Re: Something similar to "du -sh'
i tried it on my linux machine.
$ du -sh ./
405M ./ <--------
$ du -skx ./|awk '{print$1/2 ^10}'
404.32 <---------
~amit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2007 11:22 PM
01-15-2007 11:22 PM
Re: Something similar to "du -sh'
find -type f | du -sk
or
find -type f -prune | du -sk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2007 12:03 AM
01-16-2007 12:03 AM
Re: Something similar to "du -sh'
probably some rounding or kibi vs. kilo issue?
I went on one of our RHFC3 linux boxes.
Oops, have you seen this?
# du -sH /usr
du: WARNING: use --si, not -H; the meaning of the -H option will soon
change to be the same as that of --dereference-args (-D)
824M /usr
If I look up the Warning about deprecated -H switch in the manpage of *my* version of du,
this indeed seems to relate to the notoriuos kibi vs. kilo issue.
excerpt from man du:
-H like --si, but also evokes a warning; will soon change to be
equivalent to --dereference-args (-D)
--si like -h, but use powers of 1000 not 1024
Well, I guess for "humans" it is considered too confusing to calculate in powers of base 2 rather than 10.
On the other hand I suspect this has been inculcated by HW vendors who can better bost with higher capacity figures of their storage devices.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2007 12:08 AM
01-16-2007 12:08 AM
Re: Something similar to "du -sh'
a little modification of Ralf's commandline to get a more linux-like output:
du -skx /opt|awk '{printf("%dM %s\n",$1/2^10,$2)}'
mfG Peter