
12 Sep
2024
12 Sep
'24
3:52 p.m.
That's the power of Linux/Bash for you, but out of curiosity, why would you want to do that?
Was just testing a deep learning model and needed to push a small subset of images through (the input directory contained several thousand).
You can enhance by ensuring your source objects are not directories too unless you're sure that'll never happen by checking before hand or using the -a option. cp will fail otherwise.
Good spotting! My input directory contained only images, so it wasn't an issue for me. Cheers, Peter