Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a directory I want to rename without spaces. This is the path to the file with spaces /home/ebank36/minecraft/The Fall of Gondolin.

I want to rename that directory to TFoG so I would like it to look like
/home/ebank36/minecraft/TFoG.

I need to do this so I can move a file out of that directory and place it in /home/ebank36/minecraft.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

From a terminal, you could issue this command:

mv /home/ebank36/minecraft/The\ Fall\ of\ Gondolin /home/ebank36/minecraft/TFoG

(NOTICE the \ before the space. This is how bash knows the special character that follows the \ should be treated as part of the name)

Or, from a GUI, just click on that directory, press F2, and type the new name.

share|improve this answer
    
Thankyou this worked. –  ebank36 Sep 15 '13 at 23:47
1  
@ebank36 It should be noted that it's better to " quote the whole path rather than escaping individual space characters. Use this instead: mv "/home/ebank36/minecraft/The Fall of Gondolin" /home/ebank36/minecraft/TFoG –  minerz029 Sep 15 '13 at 23:49
    
Ok I will try and remember for future questions. –  ebank36 Sep 15 '13 at 23:52
add comment

You can do this by opening the folder in the file manager, and then right clicking the folder and selecting "Rename", typing in the new folder name. The keyboard shortcut for renaming a selected file or folder, or several selected files or folders for a group rename, is F2. You may also use the command line.

share|improve this answer
    
sorry this won't help considering I do not have the desktop installed. –  ebank36 Sep 15 '13 at 23:46
    
Oh - that wasn't clear in your question. You may see the link I provided. –  searchfgold6789 Sep 15 '13 at 23:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.