Re: How to sort files in a directory?

2008-02-29 Thread Rodolfo Medina
Rodolfo Medina wrote: I want to sort all files with, say, .txt extension that are in the directory `/path/to/dir' and all its subdirectories, and I want to perform this search starting from the directory itself: how can I do that? I didn't manage with `find'. Thanks for any suggestion

Re: How to sort files in a directory?

2008-02-28 Thread Michelle Konzack
Am 2008-02-24 18:49:09, schrieb Tzafrir Cohen: Find indeed needs some help. It can only produce a list, and not very good at sorting it out-of-order. find . -name \*.txt -printf '%f\n' | sort Better: find . -name *.txt |sort which works nicely Thanks, Greetings and nice Day

Re: How to sort files in a directory?

2008-02-28 Thread Michelle Konzack
Am 2008-02-24 17:51:48, schrieb Rodolfo Medina: Hi. I want to sort all files with, say, .txt extension that are in the directory `/path/to/dir' and all its subdirectories, and I want to perform this search starting from the directory itself: how can I do that? I didn't manage with `find'.

Re: How to sort files in a directory?

2008-02-28 Thread Tzafrir Cohen
On Wed, Feb 27, 2008 at 03:35:47PM +0100, Michelle Konzack wrote: Am 2008-02-24 18:49:09, schrieb Tzafrir Cohen: Find indeed needs some help. It can only produce a list, and not very good at sorting it out-of-order. find . -name \*.txt -printf '%f\n' | sort Better: find .

[solved] Re: How to sort files in a directory?

2008-02-27 Thread Rodolfo Medina
Jeff D [EMAIL PROTECTED] writes: Rodolfo Medina wrote: I want to sort all files with, say, .txt extension that are in the directory `/path/to/dir' and all its subdirectories, and I want to perform this search starting from the directory itself: how can I do that? I didn't manage with

Re: [solved] Re: How to sort files in a directory?

2008-02-27 Thread Tzafrir Cohen
On Wed, Feb 27, 2008 at 08:14:06PM +, Rodolfo Medina wrote: Jeff D [EMAIL PROTECTED] writes: Thanks to all who replied. It seems that for my purposes this works: $ cd /path/to/dir $ ls *.txt */*.txt | sort Huh? That is not what you asked for. It does not trim the directory names.

How to sort files in a directory?

2008-02-24 Thread Rodolfo Medina
Hi. I want to sort all files with, say, .txt extension that are in the directory `/path/to/dir' and all its subdirectories, and I want to perform this search starting from the directory itself: how can I do that? I didn't manage with `find'. Thanks for any suggestion Rodolfo e.g.: suppose that

Re: How to sort files in a directory?

2008-02-24 Thread danlayman
Rodolfo Medina wrote: Hi. I want to sort all files with, say, .txt extension that are in the directory `/path/to/dir' and all its subdirectories, and I want to perform this search starting from the directory itself: how can I do that? I didn't manage with `find'. Thanks for any suggestion

Re: How to sort files in a directory?

2008-02-24 Thread Michael Marsh
On Sun, Feb 24, 2008 at 12:51 PM, Rodolfo Medina [EMAIL PROTECTED] wrote: I want to sort all files with, say, .txt extension that are in the directory `/path/to/dir' and all its subdirectories, and I want to perform this search starting from the directory itself: how can I do that? I

Re: How to sort files in a directory?

2008-02-24 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/24/08 11:54, Wayne Topa wrote: Rodolfo Medina([EMAIL PROTECTED]) is reported to have said: Hi. I want to sort all files with, say, .txt extension that are in the directory `/path/to/dir' and all its subdirectories, and I want to perform

Re: How to sort files in a directory?

2008-02-24 Thread Wayne Topa
Rodolfo Medina([EMAIL PROTECTED]) is reported to have said: Hi. I want to sort all files with, say, .txt extension that are in the directory `/path/to/dir' and all its subdirectories, and I want to perform this search starting from the directory itself: how can I do that? I didn't manage

Re: How to sort files in a directory?

2008-02-24 Thread Tzafrir Cohen
On Sun, Feb 24, 2008 at 05:51:48PM +, Rodolfo Medina wrote: Hi. I want to sort all files with, say, .txt extension that are in the directory `/path/to/dir' and all its subdirectories, and I want to perform this search starting from the directory itself: how can I do that? I didn't

Re: How to sort files in a directory?

2008-02-24 Thread Tzafrir Cohen
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

Re: How to sort files in a directory?

2008-02-24 Thread Jeff D
Rodolfo Medina wrote: Hi. I want to sort all files with, say, .txt extension that are in the directory `/path/to/dir' and all its subdirectories, and I want to perform this search starting from the directory itself: how can I do that? I didn't manage with `find'. Thanks for any suggestion