Terminal basics and help with the "mv" command

Discussion in 'Mac Basics and Help' started by Eetrey, May 8, 2010.

  1. Eetrey macrumors newbie

    Joined:
    Apr 20, 2010
    #1
    For the life of me I cannot move a file in a terminal. I have seen every example online and when I try my own version I get this response:

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

    I have tried "man mv" but the manual was not much help can anyone give me some suggestions. I want to be able to manipulate my files using a terminal. Thanks in advance.
     
  2. calderone macrumors 68040

    calderone

    Joined:
    Aug 28, 2009
    Location:
    Seattle
  3. Eetrey thread starter macrumors newbie

    Joined:
    Apr 20, 2010
    #3
    sure this is what i gather should work:


    mv missed notes 1.pdf /Users/edenpreciado/documents/cee163/missed notes 1.pdf
     
  4. calderone macrumors 68040

    calderone

    Joined:
    Aug 28, 2009
    Location:
    Seattle
    #4
    You have to escape the spaces. And Documents needs to be capitalized, the paths are case sensitive.

    So that would actually be:

    Code:
    mv missed\ notes\ 1.pdf /Users/edenpreciado/Documents/cee163/missed\ notes\ 1.pdf
    Also, to make things easier, take advantage of tab completion. For example assuming missed notes was the only file in the current directory that began with mis, typing

    Code:
    mv mis
    And and then typing tab, terminal would autocomplete the path for you. You could then do this throughout the target path as well.

    So, /U tab, e tab, Doc tab, etc.
     
  5. Eetrey thread starter macrumors newbie

    Joined:
    Apr 20, 2010
    #5
    nicely done kind sir. Seriously though, thank you very much. I want to become somewhat familiar with the terminal and this really helps.
     
  6. calderone macrumors 68040

    calderone

    Joined:
    Aug 28, 2009
    Location:
    Seattle

Share This Page