Find the answer to your Linux question:
Results 1 to 4 of 4
I use SFTP and the following commands to upload and download multiple files: mput * mget * However, the above commands will skip uploading/downloading directories and subdirectories. Is there a ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2007
    Posts
    11

    SFTP and mput * / mget *


    I use SFTP and the following commands to upload and download multiple files:
    mput *
    mget *

    However, the above commands will skip uploading/downloading directories and subdirectories. Is there a command like mget or mput that allows downloading/uploading everything: files: directories, subdirectories at once.

    Any help on this will appreciated.

    Bernard

  2. #2
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    Probably a recursive option like scp has -r. But scp sucks rocks for this (I am guessing sftp might behave in a similar way), because it will recursively follow symlinks, even ones that will cause an infinite loop, and turn a 2 GB transfer into 12 GB and going before you know it. I just rsync, normally something like this:

    Code:
    rsync -avrP --progress user@fromsystem:/fromdir/ user@tosystem:/todir/

  3. #3
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    And AFAIK rsync tunnels through ssh if you use user@system:/path for filenames.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jul 2007
    Posts
    11

    rsync, sftp & recursive option

    Thanks for your help - I've started using rsync instead of SFTP. SFTP does not have the recursive option.

Posting Permissions

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