CLI Syntax help - how to move a file???

Asked by Dave Haring on 2011-07-27

This drive me crazy! How to move file?

I try https://answers.launchpad.net/ubuntu/+source/gnome-terminal/+question/135580 but its not the same

File is on Desktop and directory exist. Something missing? Thanks!!!

h4ck@h4ck-G73Sw:/$ sudo mv /home/h4ck/Desktop/arrow.scm /home/h4ck/usr/share/gimp/2.0/scripts
mv: cannot move `/home/h4ck/Desktop/arrow.scm' to `/home/h4ck/usr/share/gimp/2.0/scripts': No such file or directory

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu coreutils Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2011-07-27
Last query:
2011-07-27
Last reply:
2011-07-27
Best Manfred Hampl (m-hampl) said : #1

I would say that the syntax of the move (mv) command is correct.

As the error message says either the file /home/h4ck/Desktop/arrow.scm does not exist
or the directory /home/h4ck/usr/share/gimp/2.0/scripts does not exist

Please try the following commands in a terminal:

ls /home/h4ck/Desktop/arrow.scm
ls /home/h4ck
ls /home/h4ck/usr
ls /home/h4ck/usr/share
ls /home/h4ck/usr/share/gimp
ls /home/h4ck/usr/share/gimp/2.0
ls /home/h4ck/usr/share/gimp/2.0/scripts

If the problem is with a missing target directoty you could try

mkdir -p -v /home/h4ck/usr/share/gimp/2.0/scripts

Dave Haring (4trade) said : #2

Yes!!! Problem was my error. Your advice to enter "ls" commands help me to find it. Thanks very much! Correct syntax was:

h4ck@h4ck-G73Sw:/$ sudo mv /home/h4ck/Desktop/arrow.scm /usr/share/gimp/2.0/scripts

Dave Haring (4trade) said : #3

Thanks Manfred Hampl, that solved my question.