What would be the best way to write a bash script and run it from cron (every hour) that:Would see if a file in a directory has changedIf changed, make a copy with incrementing version number and dateappended to filenameKeep last 15 versions of the file in the directory and delete theones above 15thI kind of feel I could have a go at it, but this one is important for me so I would be very glad to have opinion from others as I don't know shell scripting that well. I use mostly Debian and fedora.
What is the best way to check if file has changed in Bash and keep 15 last copies of it?
linux;bash;backup