Weblog entry #7 for nicc777

One liner: top ten largest files...
Posted by nicc777 on Thu 16 Mar 2006 at 14:01
Tags: none.

In general, excluding anything in a *bin* directory:

# find / -type f -ls | sort -k 7 -r -n | grep -v '/bin' | head

Then, to really only exclude executables:

# find / -type f -not -perm -g=x,-o=x -ls | sort -k 7 -r -n | head
and obviously to check the largest executable files:
# find / -type f -perm -g=x,-o=x -ls | sort -k 7 -r -n | head

Have fun

 

Comments on this Entry

Posted by dkg (216.254.xx.xx) on Wed 22 Mar 2006 at 16:49
[ Send Message | View dkg's Scratchpad | View Weblogs ]
Thanks for these good commands! But note that your first query will miss any files whose names start with bin (e.g. bindresvport.o).

You can fix this (and use a shorter pipeline) if you change the expression to look like this:

# find / -type f ! -wholename '*/bin/*' -ls | sort -k 7 -r -n | head

[ Parent | Reply to this comment ]

Posted by nicc777 (196.25.xx.xx) on Wed 22 Mar 2006 at 17:34
[ Send Message | View Weblogs ]
Thanks - this is a very good fix.


===============================================
=== http://4j.blogspot.com/ ===
=== http://sourceforge.net/projects/lampas/ ===
===============================================

Joh 3:36

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search