Operating System - HP-UX
1758690 Members
2969 Online
108874 Solutions
New Discussion

script for total files size

 
SOLVED
Go to solution
Raj D.
Honored Contributor

Re: script for total files size

himacs,

> I want to get the total size of files dated Oct 4 under /data.


Try this:
# cd /data ; ls -l | grep "Oct 4" | awk 'BEGIN {sum=0} {sum+=$5} END {print sum}'



Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "