LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   moving a file (https://www.linuxquestions.org/questions/linux-newbie-8/moving-a-file-164441/)

dominant 03-31-2004 01:30 AM

moving a file
 
I want to move a file and give a new name with the date stamp.

I tried that as below with no success.

#mv update.log update.log-`date'

Onemessedupjedi 03-31-2004 01:42 AM

if that was your exact code you forgot the space between .log and your arguement. I'll try doing it(I just use window managers for crap like that) and post back(or more likely edit)

edit: mv has no such date option. you really should have used mv --help or man mv before posting so you could figure it out.

dominant 03-31-2004 04:11 AM

any ideas?

Demonbane 03-31-2004 05:13 AM

try using double quotes
Code:

mv update.log "update.log-`date`"
]

dominant 03-31-2004 06:39 AM

thanks


All times are GMT -5. The time now is 07:29 AM.