I have created two directories [Dir1] and [Dir2] and inside [Dir1], I have created a file called impFile.
Now, From where I ended up, I want to move impFile that is in Dir1 into Dir2. I tried this
" mv /Dir1/impFile.txt /Dir2/impFile.txt
but it doesnt work.
Can anybody tell me what I can do to make this work.
[ec2-user@ip-178-31-8-98 ~]$ mkdir Dir1
[ec2-user@ip-178-31-8-98 ~]$ mkdir Dir2
[ec2-user@ip-178-31-8-98 ~]$ cd /home/ec2-user/Dir1
[ec2-user@ip-178-31-8-98 Dir1]$ echo hi > impFile.txt
[ec2-user@ip-178-31-8-98 Dir1]$ cd
[ec2-user@ip-178-31-8-98 ~]$
[ec2-user@ip-178-31-8-98 ~]$ pwd
/home/ec2-user
[ec2-user@ip-172-31-8-94 ~]$ <-- WHERE I ENDED UP
If I'm not wrong,
"/" = root of the system. Instead, you wish to call move from your current folder, so the mv command should look like :
"." means "actual position"
it is the same as doing :
Quick edit : mv = target (file) to destination (folder)