Hello there,
recently I bought a Dlink DCS-2121 web camera in order to upload a snapshot at web server. This damned cam has not an option (I changed lot of firmwares) to create an single only file and overwriting this one, but continuously uploading in directories with random (can not understand where they comes) names, snapshots with filenane based on time, date.
So I am trying to create a cron job in my cpanel menu to find the newest file from those directories , every 2 minutes let's say, and copy this file to a new location. Have searched the forum and found some solutions but I am an experienced user to combine them.
This command
Code:
ls -lrt|grep test|tail -1|awk '{print ""$8}'
seems to find the newest file "test" for example, but I can not modify it to search in all subdirectories and input probably an -exec (or cp) command to copy this file to a new destination and all these in one command.
Thanks for your patience, any help could highly appreciate.