[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A new utility: trv
From: |
James Youngman |
Subject: |
Re: A new utility: trv |
Date: |
Wed, 5 Jan 2005 17:01:00 +0000 |
User-agent: |
Mutt/1.3.28i |
On Wed, Jan 05, 2005 at 04:29:35PM +0100, Alfred M. Szmidt wrote:
> Once findutils does the decent thing...
> trv() { ... }
>
> Don't see why this would be decent, since it can already be done with
> a bit of shell as I already pointed out.
Just user convenience, nothing more.
> What would happen if you do:
>
> find . -type f -execdir "echo {}" \;
Supposing you prepared with
mkdir /tmp/foo ; cd /tmp/foo ; touch a b c
mkdir /tmp/foo/baz ; cd /tmp/foo/baz ; touch x y
cd /tmp/foo
then the command you suggest would produce something like
./a
./c
./b
./y
./x
... but possibly in a different order, because readdir() returns
directory entries in no specific order.
However, GNU findutils does not yet implement -execdir (it is
currently only a *BSD feature, depite the fact that it is far superior
from a security point of view, since it allows find to avoid race
conditions). GNU findutils will implement -execdir eventually.
James.