Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 27, 2007, 12:48 PM   #1
SHankara
macrumors member
 
Join Date: Oct 2007
trouble changing a folder name in terminal

im trying to rename a folder with the "mv" command but its not working

heres what I do

mv カトロ .カトロ

but it just goes to the resulting mv command options,is it becuase of the japanese characters,or becuase the folder is on a diff volume?
SHankara is offline   0 Reply With Quote
Old Nov 27, 2007, 12:56 PM   #2
SHankara
Thread Starter
macrumors member
 
Join Date: Oct 2007
or should i try a diff shell?
SHankara is offline   0 Reply With Quote
Old Nov 27, 2007, 12:58 PM   #3
Cromulent
macrumors 603
 
Cromulent's Avatar
 
Join Date: Oct 2006
Location: The Land of Hope and Glory
Type mv *original name* *new name*.

Basically you just move the original to a new name if that makes sense. Unix type system work slightly differently.

Edit : bah didn't read the thread...

As far as I am aware you shouldn't have any problems with that as long as you are moving the folder within the same directory.
__________________
Neural Advance - Mac OS X, UNIX and Windows Development
Last.fm Profile | Extreme Metal Reviews
MP 4x 2.66Ghz Xeons / 6GB RAM / 640GB + 500GB + 750GB + 1TB HDDs / ATI Radeon 4870 / iPad 3
Cromulent is offline   0 Reply With Quote
Old Nov 27, 2007, 01:29 PM   #4
Big Dave
macrumors 6502
 
Join Date: Nov 2007
Location: Crestview, Fl
Special character in the new file name

In Unix, . is a special character usually equating to the current directory. IE moving something from /some/path to . (current location). Try escaping before the . meaning mv file \.file or mv file "file"
Big Dave is offline   0 Reply With Quote
Old Nov 27, 2007, 02:05 PM   #5
itickings
macrumors 6502a
 
itickings's Avatar
 
Join Date: Apr 2007
Quote:
Originally Posted by SHankara View Post
im trying to rename a folder with the "mv" command but its not working

heres what I do

mv カトロ .カトロ

but it just goes to the resulting mv command options,is it becuase of the japanese characters,or becuase the folder is on a diff volume?
Try quoting the names instead. Obviously I have no idea what you are trying to rename to what, but if it is カトロ to .カトロ, try this:

Code:
mv "カトロ" ".カトロ"
Edit: If you copied your exact command line when you posted, the problem is that the " " is a blank character which is not a space " ". mv then sees only one parameter because of this, not two.

Last edited by itickings; Nov 27, 2007 at 02:14 PM.
itickings is offline   0 Reply With Quote
Old Nov 27, 2007, 02:08 PM   #6
Peace
macrumors P6
 
Peace's Avatar
 
Join Date: Apr 2005
Location: Space--The ONLY Frontier
Pardon my ignorance but wouldn't it be easier to just click on the folder and change the name ?

This is under the assumption you're doing this from the same computer of course.
Peace is offline   0 Reply With Quote
Old Nov 27, 2007, 06:44 PM   #7
ChrisA
macrumors G4
 
Join Date: Jan 2006
Location: Redondo Beach, California
Quote:
Originally Posted by Peace View Post
Pardon my ignorance but wouldn't it be easier to just click on the folder and change the name ?
No. It is quicker to type"mv a b" than to click the finder icon, wait for it to start then drill down to the folder and click the name and change it. Got a stopwatch? Try it both ways.
ChrisA is offline   0 Reply With Quote
Old Nov 27, 2007, 07:49 PM   #8
SHankara
Thread Starter
macrumors member
 
Join Date: Oct 2007
Quote:
Originally Posted by itickings View Post
Try quoting the names instead. Obviously I have no idea what you are trying to rename to what, but if it is カトロ to .カトロ, try this:

Code:
mv "カトロ" ".カトロ"
Edit: If you copied your exact command line when you posted, the problem is that the " " is a blank character which is not a space " ". mv then sees only one parameter because of this, not two.
Thanks it worked,but can you explain why this worked for the japanese characters?regular roman text doesnt need the quotes
SHankara is offline   0 Reply With Quote
Old Nov 27, 2007, 07:52 PM   #9
SHankara
Thread Starter
macrumors member
 
Join Date: Oct 2007
WOW strange I dont know if its bug,but I jsut renamed without the qoutes.something to do with spacing of roman and japanese characters!

thanks for your guys help!
SHankara is offline   0 Reply With Quote
Old Nov 28, 2007, 02:24 PM   #10
itickings
macrumors 6502a
 
itickings's Avatar
 
Join Date: Apr 2007
Quote:
Originally Posted by SHankara View Post
WOW strange I dont know if its bug,but I jsut renamed without the qoutes.something to do with spacing of roman and japanese characters!

thanks for your guys help!
It was all the spacing as I pointed out in my edit.

Quotes are often good to use though, they can help avoid disasters. The Terminal is very powerful, it can help you do your work fast, or help you screw up your system even faster
itickings is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Changing a "Home" Folder Name in "Places" OSX ghuczek OS X 11 Feb 20, 2012 10:49 PM
Changing Home Folder Name in Snow Leopard niter Mac Basics and Help 10 Jan 11, 2012 02:13 AM
Need help when changing the name of the home directory folder in Lion huntert93 Mac OS X 10.7 Lion 3 Sep 20, 2011 05:31 PM
Change name in Terminal Entries Neo-Tech OS X 2 Apr 25, 2010 12:33 PM
Changing the name in terminal stormbob Mac Basics and Help 1 Sep 29, 2008 10:23 AM


All times are GMT -5. The time now is 09:44 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC