I'm trying to figure out the "Linux way" of accomplishing the following task. I have a directory with a bunch of sub-directories, each of which contain multiple files of various filetypes. I can easily narrow that down using the "find" command:
find . -name "*.jpg"
Which would return me a list of all of the files ending in .jpg. In addition (but separately), I can also split a directory into groups of files, 100MB each, with the dirsplit command:
dirsplit --size 100MB -m --expmode 1 .
So, now two questions. First, I'd like to combine the two commands, so that dirsplit acts only on the output of the 'find' command - i.e. it only rearranges those JPG's, instead of rearranging everything. Is it possible to pipe into dirsplit?
The second question is the "-m" flag, which you can see here: https://manned.org/dirsplit/15f31c9a will cause dirsplit to actually move the files to the desired folders. My question is whether it's possible to copy instead of move - meaning, leave the files where they are but make an additional copy of them in groups of 100.