So I have a file that I want to copy if it has been modified. I want to save it as date and time in it's new location.
mv my_file.db $(date +%F)
This command will move it and set the date as the name, but it removes the extension. I have 3 different file extensions I want to move. I also want to have the timestamp as I will be copying multiple times per day.
Input:
sdfgdg.a
abdfgs.b
dfgdfg.c
So by running...
mv * ../Folder
Should produce:
Folder/sdfgdg-2015-01-02-14:50:00.a
Folder/abdfgs-2015-01-02-14:50:00.b
Folder/dfgdfg-2015-01-02-14:50:00.c