linux cp question

Discussion in 'OT Technology' started by MP, Sep 7, 2004.

  1. MP

    MP New Member

    Joined:
    Sep 10, 2002
    Messages:
    34,377
    Likes Received:
    0
    Location:
    Silicon Valley
    how do i copy a file from my machine onto a remote machine that i'm logged into via ssh

    say the file i need to copy is

    in Documents/School/file.jpg

    and i need to put it into a machine that i'm logged onto

    how do i do that?
     
  2. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    if you are using ssh on both machines, then you can use scp (secure copy)

    scp [email protected]:/file1 [email protected]:/dest_file

    if your file that you want to copy is already on your local box you can just do it like this...

    scp ./etc/whateverFileYouWant [email protected]:/etc/whatever
     
  3. MP

    MP New Member

    Joined:
    Sep 10, 2002
    Messages:
    34,377
    Likes Received:
    0
    Location:
    Silicon Valley
    i'm on my mac and so is the file

    and I'm logged into the remote machine via terminal ssh
     
  4. MP

    MP New Member

    Joined:
    Sep 10, 2002
    Messages:
    34,377
    Likes Received:
    0
    Location:
    Silicon Valley
    how do i get the full path of a file?
     
  5. MP

    MP New Member

    Joined:
    Sep 10, 2002
    Messages:
    34,377
    Likes Received:
    0
    Location:
    Silicon Valley
    hmm it keeps says no such file or directory

    /Users/myname/Documents/School/file.name

    i copied it so I know i didn't spell it wrong
     
  6. samm

    samm Next in Line

    Joined:
    Dec 22, 2000
    Messages:
    2,630
    Likes Received:
    0
    Location:
    San Jose, CA
    open a terminal on your mac:

    cd Documents/School
    scp file.name [email protected]:.

    that is all you need to do.
     
  7. MP

    MP New Member

    Joined:
    Sep 10, 2002
    Messages:
    34,377
    Likes Received:
    0
    Location:
    Silicon Valley
    ohhhh haha that's a bit easyer
     

Share This Page