How do I rename a file in another directory?
I am here: /volumes/Thor/xinu/nov/ I've moved over myfile.txt into /tmp/mymac/tuesday/thirteen When trying to use mv I end up moving the file back into the previous directory... I know i have some issues in my command.... just cant figure it out!
mv /tmp/mymac/tuesday/thirteen/myfile.txt /tmp/mymac/tuesday/thirteen/newmyfile.txt
make sure to use absolute path in destination.
My guess is you are doing something similar to this:...
My guess is you are doing something similar to this:
mv Documents/test111 test999
Then discovering that test999 is in ~/
This is because the syntax for mv is /path/to/filename /path/to/newfilename
So you are instructing each time to move it into the current directory on the second arguement
So instead of mv /tmp/mymac/tuesday/thirteen twelve
mv /tmp/mymac/tuesday/thirteen /tmp/mymac/tuesday/twelve
or, (cd /tmp/mymac/tuesday mv thirteen twelve)