Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-30-2010, 11:56 AM
|
#1
|
|
LQ Newbie
Registered: Jan 2007
Location: North Texas
Distribution: SUSE 9, 10; CentOS4,5;Redhat; (K)Ubuntu; Knoppix
Posts: 18
Rep:
|
disk usage by file age
I'm trying to figure out how to gather some disk data. What I need is
to find the disk usage by subfolder, but only by files older than a
certain time. I can get a list of files with
find ./ftp/news +mtime 180
and get a list of everything older than six months.
I can do
du -sh ./ftp/news/*
and find the usage by subfolder.
What I need is to combine the two, so I get something like
15M ftp/news/4-Dallas
40M ftp/news/4-Washington
560M ftp/news/House
1.1G ftp/news/Senate
717M ftp/news/White House
69M ftp/news/YIR 2009
65M ftp/news/stuff
knowing that the size is for files over six months old.
Any simple ideas for this?
Thanks,
Michael
|
|
|
|
06-30-2010, 02:29 PM
|
#2
|
|
Senior Member
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288
Rep:
|
Does this give you what you want?
Code:
find ./ftp/news +mtime 180 -exec du -sh {} \;
Not sure if I'm understanding you well enough to give a proper answer.
HTH
Forrest
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:33 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|