lftp sftp file to specific directory

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite
1












I need to copy a file over SFTP to a specific directory. I use LFTP because this connection requires an IP6 mDNS name.



lftp sftp://admin:password123@serial.local -e "put file.txt; bye"


This works, but the file ends up in /home/admin



I want the file to end up in /home/admin/upload



Can I somehow specify the destination directory? I'd be happy to use an additional command to do so, but it must be scripted with lftp/sftp










share|improve this question

























    up vote
    0
    down vote

    favorite
    1












    I need to copy a file over SFTP to a specific directory. I use LFTP because this connection requires an IP6 mDNS name.



    lftp sftp://admin:password123@serial.local -e "put file.txt; bye"


    This works, but the file ends up in /home/admin



    I want the file to end up in /home/admin/upload



    Can I somehow specify the destination directory? I'd be happy to use an additional command to do so, but it must be scripted with lftp/sftp










    share|improve this question























      up vote
      0
      down vote

      favorite
      1









      up vote
      0
      down vote

      favorite
      1






      1





      I need to copy a file over SFTP to a specific directory. I use LFTP because this connection requires an IP6 mDNS name.



      lftp sftp://admin:password123@serial.local -e "put file.txt; bye"


      This works, but the file ends up in /home/admin



      I want the file to end up in /home/admin/upload



      Can I somehow specify the destination directory? I'd be happy to use an additional command to do so, but it must be scripted with lftp/sftp










      share|improve this question













      I need to copy a file over SFTP to a specific directory. I use LFTP because this connection requires an IP6 mDNS name.



      lftp sftp://admin:password123@serial.local -e "put file.txt; bye"


      This works, but the file ends up in /home/admin



      I want the file to end up in /home/admin/upload



      Can I somehow specify the destination directory? I'd be happy to use an additional command to do so, but it must be scripted with lftp/sftp







      scripting sftp






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 9 '17 at 23:20









      LVLAaron

      75041929




      75041929




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          Perhaps all you need is an additional command:



          lftp sftp://admin:password123@serial.local -e "cd upload; put file.txt; bye"





          share|improve this answer




















          • That works. You know I've been having a long day when I can't figure that out on my own. Thanks mate!
            – LVLAaron
            Oct 9 '17 at 23:28










          • Glad it worked; I'm not an lftp user, but saw that -e appeared to take multiple commands.
            – Jeff Schaller
            Oct 9 '17 at 23:42










          • Good find. LFTP is pretty cool. It's one of the only CLI utilities in OSX that can resolve an IPv6 mdns name.
            – LVLAaron
            Oct 10 '17 at 12:09










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f397139%2flftp-sftp-file-to-specific-directory%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          Perhaps all you need is an additional command:



          lftp sftp://admin:password123@serial.local -e "cd upload; put file.txt; bye"





          share|improve this answer




















          • That works. You know I've been having a long day when I can't figure that out on my own. Thanks mate!
            – LVLAaron
            Oct 9 '17 at 23:28










          • Glad it worked; I'm not an lftp user, but saw that -e appeared to take multiple commands.
            – Jeff Schaller
            Oct 9 '17 at 23:42










          • Good find. LFTP is pretty cool. It's one of the only CLI utilities in OSX that can resolve an IPv6 mdns name.
            – LVLAaron
            Oct 10 '17 at 12:09














          up vote
          2
          down vote



          accepted










          Perhaps all you need is an additional command:



          lftp sftp://admin:password123@serial.local -e "cd upload; put file.txt; bye"





          share|improve this answer




















          • That works. You know I've been having a long day when I can't figure that out on my own. Thanks mate!
            – LVLAaron
            Oct 9 '17 at 23:28










          • Glad it worked; I'm not an lftp user, but saw that -e appeared to take multiple commands.
            – Jeff Schaller
            Oct 9 '17 at 23:42










          • Good find. LFTP is pretty cool. It's one of the only CLI utilities in OSX that can resolve an IPv6 mdns name.
            – LVLAaron
            Oct 10 '17 at 12:09












          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          Perhaps all you need is an additional command:



          lftp sftp://admin:password123@serial.local -e "cd upload; put file.txt; bye"





          share|improve this answer












          Perhaps all you need is an additional command:



          lftp sftp://admin:password123@serial.local -e "cd upload; put file.txt; bye"






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Oct 9 '17 at 23:23









          Jeff Schaller

          32.3k849109




          32.3k849109











          • That works. You know I've been having a long day when I can't figure that out on my own. Thanks mate!
            – LVLAaron
            Oct 9 '17 at 23:28










          • Glad it worked; I'm not an lftp user, but saw that -e appeared to take multiple commands.
            – Jeff Schaller
            Oct 9 '17 at 23:42










          • Good find. LFTP is pretty cool. It's one of the only CLI utilities in OSX that can resolve an IPv6 mdns name.
            – LVLAaron
            Oct 10 '17 at 12:09
















          • That works. You know I've been having a long day when I can't figure that out on my own. Thanks mate!
            – LVLAaron
            Oct 9 '17 at 23:28










          • Glad it worked; I'm not an lftp user, but saw that -e appeared to take multiple commands.
            – Jeff Schaller
            Oct 9 '17 at 23:42










          • Good find. LFTP is pretty cool. It's one of the only CLI utilities in OSX that can resolve an IPv6 mdns name.
            – LVLAaron
            Oct 10 '17 at 12:09















          That works. You know I've been having a long day when I can't figure that out on my own. Thanks mate!
          – LVLAaron
          Oct 9 '17 at 23:28




          That works. You know I've been having a long day when I can't figure that out on my own. Thanks mate!
          – LVLAaron
          Oct 9 '17 at 23:28












          Glad it worked; I'm not an lftp user, but saw that -e appeared to take multiple commands.
          – Jeff Schaller
          Oct 9 '17 at 23:42




          Glad it worked; I'm not an lftp user, but saw that -e appeared to take multiple commands.
          – Jeff Schaller
          Oct 9 '17 at 23:42












          Good find. LFTP is pretty cool. It's one of the only CLI utilities in OSX that can resolve an IPv6 mdns name.
          – LVLAaron
          Oct 10 '17 at 12:09




          Good find. LFTP is pretty cool. It's one of the only CLI utilities in OSX that can resolve an IPv6 mdns name.
          – LVLAaron
          Oct 10 '17 at 12:09

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f397139%2flftp-sftp-file-to-specific-directory%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay