[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re:
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 \{\} \;
Thanks!
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
>
- [no subject], Budi, 2019/03/15
- Re:, Eric Blake, 2019/03/15
- Re:, Dale R. Worley, 2019/03/15
- Prev by Date:
Re:
- Next by Date:
Re:
- Previous by thread:
Re:
- Next by thread:
Re:
- Index(es):