[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to sort files in a directory?



On Sun, Feb 24, 2008 at 12:13:54PM -0600, Ron Johnson wrote:
> 
> On 02/24/08 11:54, Wayne Topa wrote:

> > ls file*/*.txt |sort
> 
> But that's not generic to an arbitrary directory depth.  You'll have
> to go to Perl or Python to do such a task.

Or zsh.

  ls **/*.txt | rev | cut -d/ -f1 | rev | sort

-- 
Tzafrir Cohen         | tzafrir@jabber.org | VIM is
http://tzafrir.org.il |                    | a Mutt's
tzafrir@cohens.org.il |                    |  best
ICQ# 16849754         |                    | friend


Reply to: