This is going to be stupid simple but I can't for the life of me figure this out. I ultimately am going to be backing up some files but first am using 7zip to put them in an archive. Whenever I run the following:
Code:
7z a -p -mx=9 -mhe -t7z backup_$(date +%D).7z /home/user/Documents
it gives me a folder for "backup_04" and then a folder inside that with the next part of the date and so on.
I've tried putting it in quotes (both single and double), back-tics, and parentheses. It either does what I said before or it gives the literal string for the date.
**Update**
So I don't think 7zip liked the format for the date. I ended up using this instead and it seems to work:
Code:
7z a -p -mx=9 -mhe backup_$(date +%y%m%d).7z /home/user/Documents