LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 12-23-2002, 10:41 AM   #1
adenardo
Member
 
Registered: Oct 2001
Location: Fort Collins, Colorado
Distribution: RHEL3/FedoraCore3
Posts: 61

Rep: Reputation: 15
scheduled maintenance


every few months (depending upon system usage) things error out or fail due to a clogged file system. I go through /var/log and archive old logs, or find huge files that got left somewhere, delete them, then everything works fine. short of log cleanup/rotation, I'm looking for a more efficient way to cleanup my filesystems on these occasions.

I have a pretty segregated disc structure:
root /:df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 3.9G 3.4G 384M 90% /
/dev/hda3 8.1G 2.5G 5.1G 33% /data
/dev/hda2 12G 7.2G 4.3G 63% /home
/dev/sda1 2.0G 1.6G 363M 82% /mp3
none 251M 0 251M 0% /dev/shm
/dev/hda7 3.9G 2.3G 1.4G 61% /tmp
/dev/hda5 3.9G 3.1G 719M 82% /usr
/dev/hda6 3.9G 213M 3.5G 6% /usr/local

now / should not be 90% full. more in the 60% ballpark. is there a way I can list the files only in the root fileystem. my thought is something like: ls -Ralhs / but only to include the / fileysystem. I'm sure there is a huge log file, or stdout being stored somewhere that I'd rather not have to dig through each subdir for. in other words, how can I query my system to say, "what are the 10 largest files on this filesystem?"

thanks in advance ;-)
 
Old 12-23-2002, 01:52 PM   #2
SlickWilly
Member
 
Registered: Dec 2002
Posts: 327

Rep: Reputation: 30
Oky...

ls -alhSR

-al : long list, all files
-h : human readable
-S : Sort by size
-R : recurse directories.

I can't find a way to make ls not do other partitions. Your list is going to be huge with with all the stuff in /dev etc...

I had better results with du.

du -ahx

-a : all
-h : Human readable
-x : This file system only.

Slick.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Scheduled shutdown? Devils_Knight Linux - Software 14 02-02-2005 01:58 PM
Scheduled tasks? onionkn1ght Linux - Software 3 01-11-2005 10:20 PM
when is next slack scheduled? larva828 Slackware 5 11-01-2004 07:36 PM
Scheduled task in linux? Dakkar Linux - Newbie 4 12-30-2003 08:54 AM
Scheduled tasks... beserier Linux - General 1 01-24-2003 08:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:24 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
Open Source Consulting | Domain Registration