On Fri, 3 Aug 2001, Robert G. Scofield wrote:
> I've had some kind of crash and the last 50 megs of my hard disk have
> been taken up with something. I can't find a core file. However, I
> know that there is a command that will show you which of your files are
> taking up the most space. Bill posted it once. Can anybody tell me
> what that command is?
Say you want to find a file larger than 2 Mb...
2 Mb is 2000kb
Use find. Want to search the whole fs and print the results?
# find / -size +2000k -print | more 2>&1
(The 2>&1 allows error to be sent to the pager "more" )
Search from your present working directory? (PWD)
# find . -size +2000k -print | more 2>&1
Search for files larger than 10 Mb which ~10,000k from present dir and
only show output that is stout not stderr:
# find . -size +10000k -print | more
Search for files less than 5 bytes from /home/huhhuh:
# find /home/huhhuh -size -5c -print | more
(c is for character, b would be for block (512 byte blocks)
You get the idea.
See man find for more good filters with find. find good. fire baaaad -
unless you are Beavis. (heh heh hrmmm)
-ME
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/CM$/IT$/LS$/S/O$ !d--(++) !s !a+++(-----) C++$(++++) U++++$(+$) P+$>+++
L+++$(++) E W+++$(+) N+ o K w+$>++>+++ O-@ M+$ V-$>- !PS !PE Y+ !PGP
t@-(++) 5+@ X@ R- tv- b++ DI+++ D+ G--@ e+>++>++++ h(++)>+ r*>? z?
------END GEEK CODE BLOCK------
decode: http://www.ebb.org/ungeek/ about: http://www.geekcode.com/geek.html
Systems Department Operating Systems Analyst for the SSU Library