Results 1 to 8 of 8

Thread: getting folders with sftp

  1. #1
    Join Date
    Jan 2006
    Beans
    616
    Distro
    Ubuntu Development Release

    getting folders with sftp

    Hi, i'm trying to use sftp to retrieve a folder from a server, but when i try doing a get, this is what happens (the folder im trying to get is "imagenes"):
    Code:
    sftp> get imagenes
    Fetching /opt/apache-tomcat-5.5.17/webapps/grupo11/imagenes to imagenes
    Cannot download non-regular file: /opt/apache-tomcat-5.5.17/webapps/grupo11/imagenes
    am I doing this right?...or to get a folder you need to do somehing else?
    ...

  2. #2
    Join Date
    Jan 2005
    Location
    Europe/France
    Beans
    227

    Re: getting folders with sftp

    you can't do a recursive get with sftp
    you should use scp instead
    Code:
    scp -r user@host:/the/path/ .

  3. #3
    Join Date
    Jan 2006
    Beans
    616
    Distro
    Ubuntu Development Release

    Re: getting folders with sftp

    I used scp and got this:
    Code:
    pablo@pcpablo:~/workspace/iic3592$ scp grupo11@kegan.ing.puc.cl:public_html/ -r
    Password:
    scp: public_html: not a regular file
    pablo@pcpablo:~/workspace/iic3592$
    I changed the location of the -r cause otherwise, it would give away a "usage" message...still get the same message that sftp gave me: "not a regular file"...
    ...

  4. #4
    Join Date
    Jan 2005
    Location
    Europe/France
    Beans
    227

    Re: getting folders with sftp

    you have to use absolute path, see my previous post
    NB: don't forget the '.' at the end, it is the destination directory (I don't know if omiting it works)

  5. #5
    Join Date
    Jan 2006
    Beans
    616
    Distro
    Ubuntu Development Release

    Re: getting folders with sftp

    Done !
    thanks for your help...
    ...

  6. #6
    Join Date
    Aug 2009
    Beans
    31

    Re: getting folders with sftp

    Perfect! it worked for me too.

  7. #7
    Join Date
    Oct 2011
    Beans
    1

    Re: getting folders with sftp

    thanks for the post. helped me also.

  8. #8
    Join Date
    Jan 2006
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: getting folders with sftp

    old thread.
    I am infallible, you should know that by now.
    "My favorite language is call STAR. It's extremely concise. It has exactly one verb '*', which does exactly what I want at the moment." --Larry Wall
    (02:15:31 PM) ***TimToady and snake oil go way back...
    42 lines of Perl - SHI - Home Site

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •