trouble changing a folder name in terminal

Discussion in 'Mac Programming' started by SHankara, Nov 27, 2007.

  1. macrumors member

    Oct 5, 2007
    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?
  2. thread starter macrumors member

    Oct 5, 2007
  3. macrumors 603


    Oct 2, 2006
    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.
  4. macrumors 6502

    Nov 27, 2007
    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"
  5. macrumors 6502a


    Apr 14, 2007
    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:

    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.
  6. macrumors P6


    Apr 1, 2005
    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.:)
  7. macrumors G4

    Jan 5, 2006
    Redondo Beach, California
    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.
  8. thread starter macrumors member

    Oct 5, 2007
    Thanks it worked,but can you explain why this worked for the japanese characters?regular roman text doesnt need the quotes
  9. thread starter macrumors member

    Oct 5, 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!
  10. macrumors 6502a


    Apr 14, 2007
    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 :p

Share This Page