Hi Friends
I was wondering how should I copy a file as script where it take a file from location A and copies to location B and puts timestamp in location B within file name?
/home/myfile.dat
copy to..
/tmp/myfile.20191002.dat
Thank you!
Hi Friends
I was wondering how should I copy a file as script where it take a file from location A and copies to location B and puts timestamp in location B within file name?
/home/myfile.dat
copy to..
/tmp/myfile.20191002.dat
Thank you!
What have you tried?
No attempts?
Certainly an answer could be found elsewhere.
today=`date +%C%y%m%d`
cp /home/myfile.dat /tmp/myfile.$today.dat