Terminal Question

Discussion in 'macOS' started by Clusty, Apr 13, 2008.

  1. Clusty macrumors regular

    Joined:
    Dec 22, 2006
    #1
    I need to know how to copy one file from my Desktop to another location on my computer with Terminal. How do I do this? I need to copy Extras.rsrc to
    . What command should I use?

    Sorry if this is in the wrong forum.
     
  2. Queso macrumors G4

    Joined:
    Mar 4, 2006
    #2
    To move it, use mv

    To copy it, use cp

    Then for the case you've described go to the directory where Extras.rsrc is located and type

    sudo cp Extras.rsrc System/Library/Frameworks/Carbon.framework/Frameworks/HiToolBox.framework/Versions/A/Resources/

    *swap cp for mv in the above if you want to move the file rather than copy

    You'll need sudo because your user account will not have rights to the /System area without temporarily promoting it.
     
  3. Clusty thread starter macrumors regular

    Joined:
    Dec 22, 2006
    #3
    How do I navigate to my Desktop(where the file is located)? My home folder is named "Adam".
     
  4. beige matchbox macrumors 6502a

    beige matchbox

    Joined:
    Mar 16, 2005
    Location:
    Oxfordshire, UK
  5. Clusty thread starter macrumors regular

    Joined:
    Dec 22, 2006
    #5
    When I did this, it said something about no such file or directory. I'm trying to do this from the Leopard install disk.
     
  6. beige matchbox macrumors 6502a

    beige matchbox

    Joined:
    Mar 16, 2005
    Location:
    Oxfordshire, UK
    #6
    oh ok

    have a go at this one...

    First check you hard drive name
    Code:
    cd /Volumes
    Followed by
    Code:
    ls
    You should see a list of the drives your mac can see, I'll assume you home folder is on Macintosh HD


    Then goto you desktop folder

    Code:
    cd /Volumes/Macintosh\ HD/Users/Adam/Desktop
     
  7. BlackMax macrumors 6502a

    BlackMax

    Joined:
    Jan 14, 2007
    Location:
    North Carolina
    #7
    I put in my Leopard install DVD to test this. What I did:

    1. Navigated to /Volumes/Mac OS X Install DVD
    2. execute: pwd and view result
    3. execute: cd ~/Desktop
    4. excute: pwd and view result

    Code:
    Macintosh:Mac OS X Install DVD myaccount$ pwd
    /Volumes/Mac OS X Install DVD
    Macintosh:Mac OS X Install DVD myaccount$ cd ~/Desktop
    Macintosh:Desktop myaccount$ pwd
    /Users/myaccount/Desktop
    
    It appears it works as designed. What are you doing differently?
     
  8. McBag macrumors newbie

    Joined:
    Mar 19, 2008
    #8
    If you google "basic unix commands" you'll get a list that should get you started with Terminal.

    Cheers,

    R
     
  9. Clusty thread starter macrumors regular

    Joined:
    Dec 22, 2006
    #9
    I can't log into my computer because the Extras.rsrc and Extras2.rsrc files have corrupt. I've got my MacBook booted off the Leopard install disk.

    I got to my Desktop, where the non-cprrupt Extras.rsrc. and Extras2.rsrc files are, so now what do I do? When I put in the sudo cp (location of where I want to copy them), it says
    Code:
    -bash: sudo: command not found
     
  10. BlackMax macrumors 6502a

    BlackMax

    Joined:
    Jan 14, 2007
    Location:
    North Carolina
    #10
    When you boot up you might have to login to single user mode :)apple:-s when you boot) to have access to your Leopard DVD and your local volume at the same time if you can't login to your regular account.

    Now if you can't even login to single user mode, you'll have to try to mount your local volume from the terminal off the Leopard install DVD. You would use the mount command for this, but I'm not sure of the exact syntax. You'll need to know what your drive is called physically. For example, mine is /dev/disk0s2.

    Or better yet, if you have another Mac I *believe* you can mount your broken Mac's filesystem remotely from your other Mac. Although, I've never done it myself. Perhaps someone else can provide the details.
     
  11. Clusty thread starter macrumors regular

    Joined:
    Dec 22, 2006
    #11
    Well, I fixed it. I just didn't use the sudo command. Everything works perfectly now! Thanks guys!
     

Share This Page