Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do I use the 'mv' command??

I want to move some scripts file into my /User/Local/Bin/

folder but i cant i get


usage: mv [-f | -i | -n] [-v] source target
       mv [-f | -i | -n] [-v] source ... directory

and i dont know what else to do because i really need to move the files.


So far this is the way im doing it



sudo mv encode-handheld-5.2.pl /User/Local/Bin/

And when I do that I get this message...



mv: rename encode-handheld-5.2.pl to /User/Local/Bin/: No such file or directory


How do I use the mv command or how am i supposed to mv those files.??


Help Please!

MacBook Pro, Mac OS X (10.6.8), 17 Inch Display, 2.2 GHz , ATI 1G

Posted on Jul 11, 2011 9:09 AM

Reply
18 replies

Jul 11, 2011 10:13 AM in response to albert969

In addition to the error in your destination path, there's also the question of whether the file you're moving is actually in the current working directory. That typically defaults to your home folder, so if the file in question isn't there, you'll need to provide a full path to it, or use the cd command to change the working directory. For example, if you downloaded this file to your desktop, you'd use:


sudo mv ~/Desktop/encode-handheld-5.2.pl /usr/local/bin/


Note that you can insert the path to a file, if you aren't sure what it is, by simply dropping the file on the Terminal window.

Jul 11, 2011 12:29 PM in response to albert969

i get the same error i cant move the file. And when i go to finder and select on go to folder and i type in /usr/local/bin it says folder not found??

Alberto-Vaqueras-MacBook-Pro:encode-handheld-5.2-with-ffmpeg-and-atomicparsley 2 albertovaquera$ sudo mv encode-handheld-5.2.pl /usr/local/bin/
Password:
Sorry, try again.
Password:
Sorry, try again.
Password:
mv: rename encode-handheld-5.2.pl to /usr/local/bin/: No such file or directory
Alberto-Vaqueras-MacBook-Pro:encode-handheld-5.2-with-ffmpeg-and-atomicparsley 2 albertovaquera$

Jul 11, 2011 12:48 PM in response to albert969

You are still not providing the path to the file you're moving. Did you read my earlier response? Are you sure this file is in the current working directory? Try the "ls" command (that's lowercase "LS"). Do you see that file? If not, follow my earlier directions.


As to whether the /usr/local/bin directory exists, it should, but you can check with:


ls -al /usr/local/bin


If you get an error, the directory does not exist for some reason, which means your system is in an uncertain state.


BTW, meaning no offense, if you don't know all this stuff, you should be very, very cautious when using the Terminal. It is a very dangerous place to those who don't have some idea what they're doing. You can irreparably damage your system (requiring a reinstall) and even destroy your data with very minor typos.

Jul 11, 2011 1:37 PM in response to thomas_r.

I can see the files that i want to move and they are in the directory.


When i type /copy and paste


ls -al /usr/local/bin


i get this


Last login: Mon Jul 11 12:50:43 on console

Alberto-Vaqueras-MacBook-Pro:~ albertovaquera$ ls -al /usr/local/bin

ls: /usr/local/bin: No such file or directory

Alberto-Vaqueras-MacBook-Pro:~ albertovaquera$



So see i dont know if the directory exists.. ??

Jul 11, 2011 1:47 PM in response to albert969

Sorry Blindness of me...

Do you know if everything else is going to work good because I also need to install other files there is a script to encode movies and I need to make ffmpeg use that directory or better the programs (encode-handheld-5.2.pl) use those directory because other stuff is going to go in.?


Why isnt there /usr/local/bin


automaticlly.... Like in my Ubuntu PC there is the usr/local/bin automatically and everything falls into place.?? Just a question>?

How do I use the 'mv' command??

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.