I'm trying to tar a large directory, and I'd like the output file to contain the date. Here's what I have so far.
tar -zcvf "mywebsite website backup" $(date "+%Y-%m-%d %T") public_html
This doesn't quite work though. As an example, I'm trying to get the single string below to be the file name. The call to date is working fine and I don't need help with that, but I'm not sure how to concatenate the "my website backup" with the output from date without first storing them in variables (which seems ham fisted).
mywebsite website backup 2001-12-01 12:04:03