News for hackers. Stuff that matters.
Re:Ask HN: What's the best obscure but useful CLI tool? by anthonyhn on Wednesday April 05, 2023 @03:50PM (#35459517)
GNU Parallel is pretty useful. You can use it to run command line programs in parallel. For example, if you wanted to gzip compress all individual files in a directory and limit the number of jobs equal to the number of CPU cores on your machine:

ls | parallel --dry-run --jobs `nproc` 'gzip {}'

(Note you have to remove the --dry-run switch to actually run this, --dry-run only prints out the commands parallel will run, not actually execute them)

Re:Ask HN: What's the best obscure but useful CLI tool? by qhwudbebd on Wednesday April 05, 2023 @04:21PM (#35459851)
Sometimes xargs -P is useful too, but it's much more limited than GNU parallel.
Re:Ask HN: What's the best obscure but useful CLI tool? by hayst4ck on Thursday April 06, 2023 @08:48PM (#35476650)
I think `xargs -P -I` is probably the closest thing to magic when it comes to commands.