- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Problem in counting total no of bytes
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-17-2007 05:16 PM
10-17-2007 05:16 PM
I am using one awk cmd which counts no of bytes and then calculate no of MB out of that.
I have put this cmd in sh file:
Here i am counting the number of bytes.
ls -lrt *vix |awk '{sum+=$5} END { printf("%10d \n",sum)}'
Problem: When i am giving ls -lrt it is out putting total no of bytes "2147483647".
When i am giving
ls -lrt |awk '{sum+=$5} END { printf("%10d \n",sum)}'
It is giving same out put "2147483647".
I am wondering that how it is happening because dir is having .DAT,.vix, any other types of files.
Till now i was confident that this calculating right but i got shocked it is not.
Can some please suggest soemthing what is wrong? Also files are very hugh in size like 1103309312 that much size.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2007 05:51 PM
10-17-2007 05:51 PM
Re: Problem in counting total no of bytes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2007 06:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2007 09:01 PM
10-17-2007 09:01 PM
Re: Problem in counting total no of bytes
Thanks a ton,
Now it is working fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2007 09:24 PM
10-17-2007 09:24 PM
Re: Problem in counting total no of bytes
I got complete solution of my problem.
Thanks