linux ek. du locate find …

Other files you may want to have a look at will be in /var/adm & /var/log (depending on your server).

A good way to determine what is taking up the most space and what can be cleaned up is to first determine what directories are using the most.

For example, if you have a /var partition and want to calculate which directories are using the most space, do this:

# cd /var
# du -skx * : sort -n

It will show you each directory directly under /var and the amount of space it is using in kilobutes. You can then use that info to determine if it is indeed log files in /var/log. Or maybe your mail server has a lot of extra queue files that are not getting processed and they are taking up your disk space… stuff like that.

Another thing to look for is extraneous core files from crashed processes that you do not need for debugging purposes. Usually they’re not that big but for bigger apps (database, etc) they can get quite large.

You can do one of two commands to find core files:

* traditional find command – this is more resource intensive if you have a large amount of data, but is the “best” because it works on EVERY Unix server

# find / -name core -print

* locate, which should work on most Linux machines but may not tell you about recent core files:

# locate core

Bir yanıt yazın