Skip to main content
7 events
when toggle format what by license comment
Mar 4, 2017 at 11:12 comment added Ole Tange @icarus That will not help is a single line is longer than the pipe size (4 or 8 KB).
Dec 24, 2016 at 9:02 vote accept Martin Vegter
Dec 24, 2016 at 1:24 comment added icarus The solution is to make sure that the programs run by xargs use line buffered output. If you have the common set of linux utilities available, then it comes with a program called stdbuf which may be able to change the buffering - read its manual pages. So you would say find .... | xargs -L64 -P4 stdbuf -oL ls -lAd | sort ....
Dec 23, 2016 at 23:29 comment added Martin Vegter so, back to the original problem, is there any solution ? Or do i have to use -L16, (or even lower) to be sure it's not garbled?
Dec 23, 2016 at 23:22 comment added icarus The stat is probably redundant, but if you are doing md5sum which has to read every byte on some potentially big files then anything like removing stat is just a micro optimization.
Dec 23, 2016 at 23:15 comment added Martin Vegter this is just a demo. In real life, I am using md5sum and stat, raher than ls.
Dec 23, 2016 at 23:09 history answered icarus CC BY-SA 3.0