As we’ve discussed previously via PM, in this case its BASH command shell that should be used.
I have to admit that it’s my first BASH-scripting experience; probably, some more qualified Linux guy will correct me. Below you can find the script I came up with which is responsible for copying latest .vbk-file from original to other location:
- Code: Select all
LatestVBK=$(find /original-location '*.vbk' | sort -rn | head -n1)
cp –v -n "$LatestVBK" /other-location
Additionally, if you're willing to run this script once a month or so, you should schedule it by the means of something like cron utility which allows tasks to automatically run in the background of the system at regular intervals.
Hope this helps.