LinHES Forums http://forum.linhes.org/ |
|
tip to find large files on your fs http://forum.linhes.org/viewtopic.php?f=3&t=18994 |
Page 1 of 1 |
Author: | graysky [ Thu Sep 25, 2008 1:56 am ] |
Post subject: | tip to find large files on your fs |
To find all files on your FS that are larger 10 megs or larger, type the following at root: Code: # find / -size +10240000c -exec du -h {} \; If you want to use a larger number like say 30 megs, substitute 30720000 in to the expression. If the list to too extensive for your shell window, you can dump the results to a text file you can browse with your favorite text editor like so: Code: find / -size +10240000c -exec du -h {} \; > output Now just nano or vim output. If you'd rather use cat, then cat it: Code: cat output | more You get the idea! Credit for this goes to Tavvi Rammar. Just wanted to share... For newbies to LINUX, a related program is called df which you can use to show you disk usage like so: Code: $ df -h
Filesystem Size Used Avail Use% Mounted on /dev/hda1 4.6G 2.3G 2.1G 53% / /dev/hda3 69G 4.7G 60G 7% /myth tmpfs 505M 4.0K 505M 1% /dev/shm |
Author: | datobin1 [ Thu Sep 25, 2008 6:10 am ] |
Post subject: | |
Very handy, Thanks for posting it. |
Author: | jmckeown2 [ Thu Sep 25, 2008 10:06 am ] |
Post subject: | |
very nice... if I could suggest: Code: find / -size +10240000c -exec du -h {} \; 2>/dev/null | tee output
The "2>/dev/null" suppresses all the errors non-root users get, eg. "Cannot read lost+found" etc. The "tee" command creates your output file AND scrolls on screen so you don't have to sit drummng your fingers while waiting for the find to complete. (pipe tee, like a plumbing tee, get it? Boy, those early UNIX guys were funny.) |
Author: | graysky [ Thu Sep 25, 2008 12:57 pm ] |
Post subject: | |
@jmc - good suggestion ![]() |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |