Re: Execute command on one file per directory
- From: mathieu <mathieu.malaterre@xxxxxxxxx>
- Date: Fri, 30 Nov 2007 01:42:45 -0800 (PST)
On Nov 29, 4:41 pm, Icarus Sparry <use...@xxxxxxxxxxxxxxxxx> wrote:
On Thu, 29 Nov 2007 06:27:03 -0800, mathieu wrote:
Could anyone tell me what is wrong with the following:
Print one filename per directory (ok):
find /images/ -type d -exec find {} -maxdepth 1 -type f -print -quit \;
Print one basename per directory:
find /images/ -type d -exec find {} -maxdepth 1 -type f -print -quit -
exec basename {} png \; \;
Thanks
Lots of things. how does the first find know that it needs to skip over
the first semicolon and use the second one?
How does the first find know it should substitute for the first {}, but
not the second?
If you "quit", why do you expect to "exec" later?
Because I want only *one* file per directory. Without the quit it is
not working...
but indeed with the -quit -exec does not work anymore
-Mathieu
.
- References:
- Execute command on one file per directory
- From: mathieu
- Re: Execute command on one file per directory
- From: Icarus Sparry
- Execute command on one file per directory
- Prev by Date: Re: Daylight saving time DST and timestamp handling
- Next by Date: Re: stat: "modification time" vs "change time"?
- Previous by thread: Re: Execute command on one file per directory
- Next by thread: REq: SQL Server Architect Analyst
- Index(es):