[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: suggested feature/patch for ls: -P TYPES, --select-file-type=TYPES
From: |
Paul Eggert |
Subject: |
Re: suggested feature/patch for ls: -P TYPES, --select-file-type=TYPES |
Date: |
Fri, 16 Dec 2005 09:34:19 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Moreno Baricevic <address@hidden> writes:
> My point is that on a populated directory (e.g. /dev on 2.4), filtering
> file types inside ls is faster than doing it externally by parsing a
> huge output.
How much faster? For example, what is the performance of your
modified version of ls with the -P option, compared to the following
ways of solving the problem without adding options?
time sh -c 'ls -lR -P c /dev' >/tmp/baz
time sh -c 'ls -lR /dev | grep "^c"' >/tmp/foo
time sh -c 'ls -ld $(find /dev -type c -print)' >/tmp/bar