Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

Console

Hello everyone, I am trying to move a file on my desktop to a folder but unable to do so. Here's the error I am getting

v1021-wn-10-17:Desktop sriharshabolisetti$ mv BasicProgram.java Java Programs/

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

Can anybody help ? Thanks in advance

4 Answers

robberbaron
robberbaron
23,869 Points

The whitespace between Java and Programs is interpreted from the console. So your computer thinks that you are giving 3 arguments to the mv command. If "Java Programs" is one directory you have to put a backspace after "Java" in order to tell the console that the following whitespace shall be considered as part of the argument. "Java\ Programs".

Cheers Marc

robberbaron
robberbaron
23,869 Points

Doing so is called "escaping". You might wanna google that expression.

James Barnett
James Barnett
39,199 Points

You don't need to escape spaces that's what double quotes are for

robberbaron
robberbaron
23,869 Points

right - that is even better

Thank You fellas :)