Im looking to copy the first 'n' files from one directory to another directory preferably with only cli tools (no scripts).
I've tried the following:
find . -maxdepth 1 -type f | head -5 | xargs cp -t /target/directory
This looked promising, but failed because osx
cpcommand doesn't appear to have the
execin a few different configurations
This probably failed for syntax problems on my end : /
I couldn't seem to get a
headtype selection working
Any help or suggestions would be appreciated.
Thanks in advance!