[ale] Disk Space used in the past 5 days
Lightner, Jeff
JLightner at dsservices.com
Thu Aug 14 13:01:36 EDT 2014
It isn't likely to give you what you need anyway. While you could get the current size of any file changed in the last 5 days it is quite likely that many of the files (especially logs) simply grew in that period. That is to say the space they're currently using may be more than they began using in the last 5 days unless they were also created in that time. Similarly if you did ctime instead of mtime it would show you the ones created in that period but would leave out any growth in existing files.
To get "growth" you'd have to have a baseline (e.g. total sizes today) then compare to that at some future point (e.g. 5 days from now). You could create a cron job to store the information each day.
-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of JD
Sent: Thursday, August 14, 2014 11:19 AM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] Disk Space used in the past 5 days
On 08/14/2014 10:48 AM, Chuck Payne wrote:
> find . -mtime +5 -exec du -sh {} \;
It seems to be asking for files OVER 5 days old. You want less than 5 days, right?
find . -mtime -5 -exec du -sh {} \;
Also - directory changes will be included, so limiting it to files might be a good idea.
find . -mtime -5 -type f -exec du -sh {} \;
I'm not getting the "summary" -
find . -mtime -5 -type f -print0 | du -hc --files0-from=-
Is closer.
_______________________________________________
Ale mailing list
Ale at ale.org
http://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
Athena(r), Created for the Cause(tm)
Making a Difference in the Fight Against Breast Cancer
__________________________________________________________
CONFIDENTIALITY NOTICE: This e-mail may contain privileged
or confidential information and is for the sole use of the intended
recipient(s). If you are not the intended recipient, any disclosure,
copying, distribution, or use of the contents of this information
is prohibited and may be unlawful. If you have received this electronic
transmission in error, please reply immediately to the sender that
you have received the message in error, and delete it. Thank you
More information about the Ale
mailing list