Hi,<div><br></div><div>I am trying to keep a directory with only the files that have changed in the last 30 days (nothing earlier).. I am trying this command..</div><div><br></div><div>find /mnt/Scheduling/ -type f -mtime -30 -exec cp -r {} /home/ftpuser/attendance_registers/ \;</div>
<div><br></div><div>I have tried with and without the "-type f" option but it only copies the files from all directories of the source to the root of the destination.. Even using "cp -r" made no difference because obviously find is just passing the filename to the cp command..</div>
<div><br></div><div>rsync is no good because I can't limit it to getting files that have changed in the last 30 days only..</div><div><br></div><div>Anyone have any suggestions how I can replicate the directory structure as well?</div>
<div><br></div><div>TIA</div>