- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- script required to check the size of Directory
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
Discussions
Discussions
Forums
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
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
тАО06-20-2011 01:20 AM
тАО06-20-2011 01:20 AM
Once the size gets exceed to 60 GB
i.e if size for this exceeds to 60 GB then it shows the size else not.
With regards,
Mjoshi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2011 01:24 AM
тАО06-20-2011 01:24 AM
Re: script required to check the size of Directory
du -kx /exaccess/AM1/access/oblix/logs
- Tags:
- du
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2011 01:29 AM
тАО06-20-2011 01:29 AM
Re: script required to check the size of Directory
Though the cmd is failing :
du: illegal option -- x
usage: du [-a] [-d] [-h|-k] [-r] [-o|-s] [-H|-L] [file ...]
du -kx /exaccess/AM1/access/oblix/logs
Plz verify the cmd once again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2011 01:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2011 01:39 AM
тАО06-20-2011 01:39 AM
Re: script required to check the size of Directory
Once you get the value in Kb, you can divide by 1 Mb to get Gb.
>Though the cmd is failing: du: illegal option -- x
du -x is perfectly valid under HP-UX. Or are you using a foreign devil du under /usr/local/bin/?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2011 01:40 AM
тАО06-20-2011 01:40 AM
Re: script required to check the size of Directory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2011 01:44 AM
тАО06-20-2011 01:44 AM
Re: script required to check the size of Directory
-x is only needed if you wanted to make sure you didn't cross any mount points. In your case probably not likely so deep in your directory hierarchy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2011 01:46 AM
тАО06-20-2011 01:46 AM
Re: script required to check the size of Directory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2011 02:01 AM
тАО06-20-2011 02:01 AM
Re: script required to check the size of Directory
#!/bin/sh
cnt=0
cnt=`du -ks /tmp`
if [ $cnt -gt 1000 ]
then
opcmsg a=BAC o=EDMConnection msg_text="EDM Established Connection is $cnt" msg_grp=OpC s=major
fi
as i am facing an error while running it :
root@ggnems21 # sh logsize.sh
logsize.sh: test: unknown operator /tmp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2011 02:07 AM
тАО06-20-2011 02:07 AM
Re: script required to check the size of Directory
you need to pipe the du with some text editing tool, as du -ks /tmp also shows the '/tmp'. So something like this, if you want only number of kbytes from the du -ks output:
du -ks /tmp | awk '{ print $1 }'