You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using command execution it appears as though there are only two options; -x / --exec to run an external command for each of the results, and -X / --exec-batch to run the command once with all search results as arguments.
Is there a native way to specify a "batch size" to be able to specify the number of results/arguments per command? As an example, I need to run touch on 1M files and it would be great if there was something like a --batch-size argument where I could specify how many results/arguments for each touch command to avoid "argument list too long" errors.
This can, of course, be done by piping into xargs -n, but would be nice if it were native/built-in to fd.
If not already built-in, adding a "batch size" along with the existing -j / --threads option would be very powerful.
Thanks!
Edit: AWESOME tool, btw!!!
The text was updated successfully, but these errors were encountered:
I missed that, thanks for the note. As far as I can tell, it looks like that feature request is for an "auto batch" size based on the platform max arg length, which would be great. The ability to have the user set the batch size manually could also be useful.
Thanks!
What version of
fd
are you using?fd 8.2.1
When using command execution it appears as though there are only two options;
-x
/--exec
to run an external command for each of the results, and-X
/--exec
-batch to run the command once with all search results as arguments.Is there a native way to specify a "batch size" to be able to specify the number of results/arguments per command? As an example, I need to run
touch
on 1M files and it would be great if there was something like a--batch-size
argument where I could specify how many results/arguments for eachtouch
command to avoid "argument list too long" errors.This can, of course, be done by piping into
xargs -n
, but would be nice if it were native/built-in to fd.If not already built-in, adding a "batch size" along with the existing
-j
/--threads
option would be very powerful.Thanks!
Edit: AWESOME tool, btw!!!
The text was updated successfully, but these errors were encountered: