How to change the filename from file.txt to renaming it to be file_may_20_2020.txt using mv command?
I have used
mv file file_(`date`).txt
I still don't know how to put a command inside another command
How to change the filename from file.txt to renaming it to be file_may_20_2020.txt using mv command?
I have used
mv file file_(`date`).txt
I still don't know how to put a command inside another command
Use either
mv file file_"`date +"%B_%d_%y"`".txt
or
mv file file_"$(date +"%B_%d_%y")".txt
mv file file_"$(date +"%B_%d_%y")".txt
What you put inside the $ is like a template string and its value is placed in the string