UNIX: How to find out the total size of files from multiple directories

_____________________________________________________________________________________________________________________

ls -ltr |awk '{ sum+=$5 } END {print "Bytes In MB:" sum/1024/1024}'
ls -ltr |awk '{ sum+=$5 } END {print "Bytes In GB:" sum/1024/1024/1024}'
ls -ltr /orabkup0[1-3]/PROD/physical/pool_??/*bkp |awk '{ sum+=$5 } END {print "Bytes In Gb:" sum/1024/1024/1024}'

_____________________________________________________________________________________________________________________

0 comments:

Post a Comment

 

acehints.com Copyright 2011-17 All Rights Reserved | Site Map | Contact | Disclaimer | Google