I have a folder with thousands of large files and I would like to find the total used disk space that was created in the last X days.
I've tried this command:
find . -type f -mtime -30 -printf '%s\n' | awk '{total=total+$1}END{print total/1024}'
As mentioned here by @k-h
calculate total used disk space by files older than 180 days using find
The output of the command is 9.84347e+09 and I'm not sure how to change the output to TB disk size.
Please advise.
Thanks,
Yaron