It always works anywhere.
find / -type f -size +10000 -exec ls -lrt {} \; | sort -n +4
You can change "/" or "." or "/home" ....
Use the -xdev option of find so as not to traverse devices...
find / -xdev -type f -size +10000 -print | xargs du -ka | sort -rn
Sometimes use du -kx|sort -n
On linux, following is the possible command:
find / -type f -size +20000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
To tweak the output and have the file sizes in a column, add this to the end:
| column -t
this just expands the tabs to even the columns out.
Finding all large directories
To find all directories taking 50k (kilobytes) blocks of space. This is useful to find out which directories on system taking lot of space.
# find / -type d -size +50k
Output:
/var/lib/dpkg/info
/var/log/ksymoops
/usr/share/doc/HOWTO/en-html
/usr/share/man/man3
Type following on your linux command prompt:
find / -size +10240000c -exec du -h {} \;
That should find all files larger then ~10MB.
http://kasperd.net/~kasperd/comp.os.linux.development.faq#kcore
Files in /proc are not really files, they are pseudo files. Kcore can be used to debug the running kernel. The format is similar to a usual core file. You don't have to worry about this file, it will always exist and doesn't indicate any problem. If you use ls, the file will appear to have a size close to the amount of kernel memory in the system. But it does not take up any disk space or memory.
Tuesday, October 28, 2008
Subscribe to:
Posts (Atom)