[Top][All Lists]

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


From: Budi
Subject: Re:
Date: Tue, 19 Mar 2019 13:44:21 +0700

How do we make 'find' to perform -exec with its argument is from
-printf, not from the default find output.
tried so far in vain:
find ~+ -type d -printf '%p /d/data/%p_%s\n' -exec cp \{\} \;


On 3/16/19, Dale R. Worley <address@hidden> wrote:
> I think what you are asking for is something like:
>     i=0
>     while ...
>     do
>       find . -mindepth $i -maxdepth $i ...
>       i=$(( i+1 ))
>     done
> That will look at all the files and directories at one depth before
> looking at all the files and directories at the next greater depth.  (It
> doesn't have any way of testing when i is larger than the depth of the
> file tree.)
> Dale

reply via email to

[Prev in Thread] Current Thread [Next in Thread]