Ahmed FASIH is a user on octodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

If you are doing something to a bunch of files, perhaps a shell script like:

for i in *jpg; do something $i somethingelse; done

and want a simple way to parallelize this, try xargs, which I love:

ls *jpg | xargs -n1 -P5 -I% something % somethingelse

will run on five files at a time. I've used this trick two or three times today in re-synchronizing photos from two phones and a camera and an SD card and Dropbox.

@22 the find command is also super handy for this since it will recurse through directories

Ahmed FASIH @22

@fenwick67 find can parallelize `-exec` commands for me too? Rad, thanks!