Article 5B9XV Finding files and copying to a another place

Finding files and copying to a another place

by
hacback17
from LinuxQuestions.org on (#5B9XV)
Hi pals, I am trying to find all the files that are more than 2 days old, then only taking 10 files and copying them to my current working directory. The command I am using is

Code:sudo find / -type f -mtime +2 2>/dev/null -exec tail -n 10 {} \; -exec cp {} . \;but this doesn't produce the expected output. And, I'm not able to spot the mistake. Could you please help?latest?d=yIl2AUoC8zA latest?i=J8e3pV4spGY:6eq4PTADQaY:F7zBnMy latest?i=J8e3pV4spGY:6eq4PTADQaY:V_sGLiP latest?d=qj6IDK7rITs latest?i=J8e3pV4spGY:6eq4PTADQaY:gIN9vFwJ8e3pV4spGY
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments