I need to move a file to an archive folder, and add a timestamp in front of the file name.
mv /dev/DataStage/myProject/source/TEST/MyFile_*.csv /dev/DataStage/myProject/Archive/TEST/MyFile_*.csv
moved MyFile_20180817.csv as My~1.csv instead of MyFile_20180817.csv
When I move the file to the archive folder, I also need to add a time stamp in the front of the file name, for example: MyFile_20180817.csv to 20180817_1057.MyFile_20180817.csv:
mv /dev/DataStage/myProject/source/TEST/MyFile_*.csv /dev/DataStage/myProject/Archive/TEST/`date +%Y%m%d_%H%M`.MyFile_*.csv
moved MyFile_20180817.csv as 201808~1.CSV instead of MyFile_20180817.csv