LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 04-19-2012, 09:57 AM   #1
izzabdullah
LQ Newbie
 
Registered: Dec 2011
Location: Birmingham, AL
Distribution: CentOS, Ubuntu, Redhat, Oracle Enterprise, AIX, OpenBSD
Posts: 8

Rep: Reputation: 0
get disk usage of files modified in last 24 hours


We are mounting a CIFS share for our VMWare infrastructure backups. Anyway, we are using a enterprise backup solution for our physical boxes, which is also backing up the contents of this mount point for offsite keeping on tape.

What I would like to do is for our incrementals, calculate the files that have been modified in the last day within that mount point and get the total size.

I have attempted this by crafting the following command within /mnt/ourCIFSmount:
find ./-mtime -1 -ls | du -ch | grep total
but this looks like it is giving 2x the amount of data sizes. If I take the | grep total off, I see the listing which everything is duplicated (24gb for directory1 and 24gb for everything beneath that directory for a total of 48gb). Anyone have a neat little trick to obtain the information I am trying to calculate?

Thanks in advance!
-Izz
 
Old 04-19-2012, 05:18 PM   #2
izzabdullah
LQ Newbie
 
Registered: Dec 2011
Location: Birmingham, AL
Distribution: CentOS, Ubuntu, Redhat, Oracle Enterprise, AIX, OpenBSD
Posts: 8

Original Poster
Rep: Reputation: 0
Figured it out incase anyone else needs the info

find ./ -mtime -1 -ls | awk '{sum += $7} END {print sum}'
that does the trick...it reports back in 'non'-human readout, but then just divide by 2^30 for gb...etc. etc.

Thanks anyway...
 
  


Reply

Tags
disk usage, modified


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
no files yet 36% disk usage?? wjtaylor Linux - Server 2 06-13-2011 05:19 PM
[SOLVED] How do I calculate the hours usage per day over a certain period? LinusStallman Linux - General 2 12-14-2010 04:18 AM
Flash audio frozen in a loop in Firefox on Debian after some hours of usage. tospo Linux - Software 5 11-12-2010 06:30 AM
Getting the disk usage for certain files per directory. cergun Linux - General 2 03-25-2010 09:07 PM
Server aburptly stops running High CPU usage PERL script after about 5 hours bpmee Linux - Server 3 05-18-2007 12:24 PM


All times are GMT -5. The time now is 02:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration