I have millions of files with the following nomenclature on a Linux machine:
The first 10 digits are timestamp and the ones followed by a
_ are specific ids. I want to move all the files matching specific filename ids to a different folder.
I tried this on the directory with files
find . -maxdepth 1 -type f | ??????????_a1ac*.jpg |xargs mv -t "/home/ubuntu/ntest"
However I am getting an error indicating:
bash 1559704165_a1ac6f55fef555ee.jpg: command not found
When I tried,
mv ??????????_a1ac*.jpg I am getting argument list too long error. I have atleast 15 different filename patterns. How do I move them.