tricks and skills for managing linux disk space

I am not looking for one answer, I am looking for knowledge to perform the task if managing disk space for Linux .

Pretty much  our disk space is managed with little spare space anywhere.

I would like to know:
1) what files are new ( with in the last month, 2 months etc ) on a partition such as /app
2)  how to find the disk space taken up by each directory.  Here is the catch, usually the disk space reported includes the subdirectorys.  An empty directory can report any size depending on what the subdirectories are and I only want to know want to know the disk space taken up only by the files in that directory.
3)  what kinds of files can normally be deleted in Linux. I already know old rpm files are kept in an directory.
4) Other secrets of the disk management game :)

thx

timfox123
TIMFOX123Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

serialbandCommented:
1)
Find files modified in the last 30 days.
find . -mtime -30
Find files modified in the last 60 days.
find . -mtime -60

2)  Not sure what you mean exactly.  Empty directories report 0 for size with du.
du -sh *

3)  Old log files.

4)  Don't ever let linux disks get full.  Use du and df to monitor your system.  Remove packages that you don't need.  Assuming you use redhat, centos or a variant that uses yum.
yum remove PACKAGE.
yum clean
0
SandyCommented:
Configure any monitoring agent which can give you alerts for protectiveness. I have all the similar answers as suggested by  TIMFOX123

TY/SA
0
gheistCommented:
There are no secrets:
1) logs should always be managed automatically (rotated etc)
2) Your scripts should not keep deleted files open ("unhide" tells you)

cd /
du -sk * | sort -n
cd fattest
repeat

and you slowli find the 2 years of protocol dumps or similar goldmines...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Gerald ConnollyCommented:
With the cost of disks being so low at present it will probably be more cost effective (taking all this management time into account) to upgrade to bigger disks/add more storage to system etc etc
0
TIMFOX123Author Commented:
Gerald, every place I have been lately pretty much lives on EMC & VMware.  Disk space goes for a lot of money.
0
Gerald ConnollyCommented:
Well you just have to cost your time against the cost of a disk, it doesnt take very long to afford another 10TB of disk, if that reduces your management workload by 50% then the pay-back time is going to measured in weeks
0
gheistCommented:
Having 10TB of space does not free you from maintaining logs and other system housekeeping tasks.... OK, you have long way to fill the disk, but sooner or later it will be full if unmaintained.
0
serialbandCommented:
Also, Employee salary is already budgeted.  New hardware purchases may not be.  The "boss" may not want to spend the money if it will make you sit around and twiddle your thumbs even more.  Unless, there's an urgent project need, I find that the finance guys hate buying stuff, since that messes with their spreadsheet balances.
0
Gerald ConnollyCommented:
OP said they were short of space, that just ups the ante when it comes to management time.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.