I an new to bash and could do with some help. I am looking to create a command that will instantly duplicate the last created file with a new new. So far I come up with the following command;
find /home/ian/Desktop/TEST/ -type f -mmin -1 -exec echo cp {} /home/ian/Desktop/TEST/ \;
But for the life or me I cannot find a way to rename the file and I have looked around and tried various methods but none seemed to work. I would like to have control over the renaming so that I can add '_backup' to each file that is copied.
What would be the best way to go about this? Sorry if this is such a basic question
All the best, Ian