- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Find results sum
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
тАО12-03-2008 03:42 AM
тАО12-03-2008 03:42 AM
I'm performing a search by some string. Like:
# find . -name "fat*" -print
./arq/0501/faturado46.0501
./arq/0501/faturado46.0503
./arq/0501/faturado46.0504
./arq/relat/1401/faturado46.1410
./arq/relat/1403/faturado11.1409
Now i need to know how is total size of files showed. Can someone help this no so smart soul? Thanks
Solved! Go to Solution.
- Tags:
- awk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-03-2008 03:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-03-2008 04:24 AM
тАО12-03-2008 04:24 AM
Re: Find results sum
My results shows a bit strange number. like 5.97688e+07. What means "+" signal?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-03-2008 05:22 AM
тАО12-03-2008 05:22 AM
Re: Find results sum
You asked a question about using 'awk' and summing values, yesterday:
http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1293510
> 5.97688e+07. What means "+" signal?
This is scientific notation where "+07" means the number rasised to the seventh power of 10.
You can avoid this by using the floating format of 'printf' as I showed you in the aforementioned thread.
For your 'find' I might suggest:
# find . -type f -name "fat*" -exec ls -l {} \+|awk 'END{printf "%10.2f\n",SUM};{print $NF,$5;SUM+=$5}'
The use of the "+" delimiter to 'find' makes this very efficient. The use of the 'type -f' keeps the results limited to files and not directories, too!
Regards!
...JRF...
- Tags:
- printf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-03-2008 06:24 AM
тАО12-03-2008 06:24 AM
Re: Find results sum
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-03-2008 06:38 AM
тАО12-03-2008 06:38 AM
Re: Find results sum
>
> This is scientific notation where "+07"
> means the number rasised to the seventh
> power of 10.
Actually, "e+07" means "times 10 to the
seventh power". The only number being raised
to a power is ten.