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

Re: Why has "find ... -exec rm -i '{}' ';'" stopped working?



> P.S.  The reason that "find ... -print0 | xargs -0r rm -i" exhibits the
> same behaviour is a different one:  Here, find's stdin filehandle would
> somehow have to be passed through to rm (via xargs, which in turn has
> its stdin attached to find's stdout), in order for rm to be able to
> read from the current interactive tty.  I'd think that such indirect,
> bidirectional pipes simply seemed too cumbersome to implement...

It's odd that I wasn't aware of this problem before.  Looking at the
xargs man page, the description of the --arg-file option makes it seem
that commands run by xargs will always have stdin closed, unless xargs
reads file names from a file instead of from stdin.



Reply to: