Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Sorting files



On 8/5/05, Meino Christian Cramer <Meino.Cramer@xxxxxx> wrote:
> From: DervishD <zsh@xxxxxxxxxxxx>
> Subject: Re: Sorting files
> Date: Fri, 5 Aug 2005 14:52:43 +0200
> 
> Hi Raúl !   :)
> 
>  (sorry, if your name comes out somehow -- hrmm -- "encrypted"...
>  my Emacs seems to handle everything other than plain ascii a little
>  weird... ;)
> 
>  Hmmm...interesting.. as soon as you mailed me that it works for you
>  my zsh seems to be that impressed, that s/he decided also to work
>  correctly....mysterious ! ;O)
> 
>  More seriously... I dont know what's happening here. May be I
>  mispelled an option or forget a "-" somewhere...
> 
>  More important: It WORKS ! :)   (even for me! ;)
> 
>  Another question in this context:
>  To check the options, I had to construct this one:
> 
>     for i in  **/*(.oL)
>     do
>                 ls -ld $i
>     done | less
> 
>  Is there any other more shorter way to achieve the same results with
>  less code -- especially without calling any other "tool" like
>  zsh/stat or xargs or such ? But I insist on getting filenames AND
>  sizes ! ;O) Not only the filename should be shown!
> 
>  Ok, now this is more like a "coding contest" for me than a practical
>  excurse....but I like to tune things :O))
> 
> 
>  Have a nice weekend !
>  Meino

Maybe you want something as simple as the following?
ls -Ssh -- **/*(.)
That'll sort all the files in descending size order and show the
sizes. It will sort _all_ files by size, not just internally sort in
each subdirectory, maybe that was what you wanted and then this won't
help. Also obviously suffers from the too many arguments possibility.

-- 
Mikael Magnusson
ps
sorry if i messed up the cc and/or to fields, gmail really doesn't
want me to use mailing lists. When i hit Reply, it just replies to the
last person and not the list, and when i select Reply To All it puts
the person in To: and the list in Cc:, I'm not sure what I'm expected
to do, don't use mailing lists a lot.



Messages sorted by: Reverse Date, Date, Thread, Author