News for hackers. Stuff that matters.
Re:Debian switches to 64-bit time for everything by silverwind on Monday July 28, 2025 @10:12AM (#44711082)
There's numerous examples of useful long commands, here is one:

    perl -p -i -e 's#foo#bar#g' **/*
Re:Debian switches to 64-bit time for everything by PaulDavisThe1st on Monday July 28, 2025 @11:08AM (#44711642)
no limits:

    find . -type f -exec perl -p -i -e 's#foo#bar#g' {} \;
Re:Debian switches to 64-bit time for everything by Someone on Monday July 28, 2025 @01:53PM (#44713412)
That runs perl multiple times, possibly/likely often in calls that effectively are no-ops. To optimize the number of invocations of perl, you can/should use xargs (with -0)
Re:Debian switches to 64-bit time for everything by dr4g0n on Monday July 28, 2025 @03:55PM (#44714852)
No need for `xargs` in this case, `find` has been able to take care of this for quite some time now, using `+` instead of `;`:

    find . -type f -exec perl -p -i -e 's#foo#bar#g' {} +
Re:Debian switches to 64-bit time for everything by tremon on Monday July 28, 2025 @04:58PM (#44715565)
xargs constructs a command line from the find results, so if **/* exceeds the max command line length, so will xargs.
Re:Debian switches to 64-bit time for everything by Someone on Wednesday July 30, 2025 @05:07AM (#44732210)
xargs was written to avoid that problem, so no, it won’t. https://man7.org/linux/man-pages/man1/xargs.1.html:

“The command line for command is built up until it reaches a system-defined limit (unless the -n and -L options are used). The specified command will be invoked as many times as necessary to use up the list of input items. In general, there will be many fewer invocations of command than there were items in the input. This will normally have significant performance benefits.”

Your only risk is that it won’t handle inputs that, on its own, are too long.