I am attempting to copy files based on their modified date, as the file names do not include the date in them. Coincidentally, the files are the 22 newest files in the directory, so if I run the command ls -lt | head -22
, the outputted files are exactly what I want to copy.
I had read this thread here, but the accepted answer didn't seem to work in Terminal, and it isn't exactly filtering by date, just by head.
I am running macOS Sierra 10.12.5.
find
command. Homework hint: the-mtime
and-exec
options. – Shadur-don't-feed-the-AI Nov 10 '17 at 08:49