[geeks] find - having a senior moment

Geoffrey S. Mendelson gsm at mendelson.com
Mon Jan 14 23:40:30 CST 2008


On Mon, Jan 14, 2008 at 12:26:10PM -0800, Brian Dunbar wrote:
> Hey,
> 
> I'm having a senior moment - I wanted to do something I did last week and
> I can't remember how I did it.
> 
> Last week I ran a find command that produced output like so ..
> 
> 95732   ./NonAgileFiles/t_agile60971292.doc

on linux it would be find . (other parameters) -exec ls -sh {} \;

to display in "human" sizes i.e. xxxk, yym and so on.

To get it to come out in size order (but not human sizes):

	find . (other parameters) -exec ls -s {} \; | sort -n

One of my favorite commands.

ls in other systems often does not have the "h" option or outputs in
blocks (which could be 512k or 1m).

Geoff.
-- 
Geoffrey S. Mendelson, Jerusalem, Israel gsm at mendelson.com  N3OWJ/4X1GM
IL Voice: (07)-7424-1667 U.S. Voice: 1-215-821-1838 
Visit my 'blog at http://geoffstechno.livejournal.com/



More information about the geeks mailing list