{"id":213,"date":"2015-04-27T13:33:45","date_gmt":"2015-04-27T13:33:45","guid":{"rendered":"http:\/\/betakb.veeble.org\/?p=213"},"modified":"2025-03-12T10:57:38","modified_gmt":"2025-03-12T05:27:38","slug":"recurssive-wget-via-ftp","status":"publish","type":"post","link":"https:\/\/www.veeble.com\/kb\/recurssive-wget-via-ftp\/","title":{"rendered":"How to recursively download folders via FTP-Linux command line"},"content":{"rendered":"\n<p>There are times when sharing files using email as attachments are not possible, and then one of the best ways is to put those files in an FTP server. Of course, it is even better to put all of them in a zip file, but what if this is not possible?<\/p>\n\n\n\n<p>So, if you have a full folder structure you need to download using some recursive download tool, you have some options, one of them is gftp which is a graphic ftp client, but here we will discuss how to do this using the command line of Linux.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"download-full-ftp-folders-recursively\"><span id=\"Download_full_ftp_folders_recursively\" class=\"mw-headline\">Download full ftp folders recursively<\/span><\/h2>\n\n\n<p>Using ncftpget to recursively download files and folders from FTP<\/p>\n\n\n\n<p>First install <a href=\"https:\/\/docs.oracle.com\/cd\/E36784_01\/html\/E36870\/ncftpget-1.html\" target=\"_blank\" rel=\"noopener\">ncftp<\/a> tools:<\/p>\n\n\n\n<p><b>For Debian \/ Ubuntu<\/b><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt-get install ncftp\n<i>For Arch Linux'<\/i>\npacman -Syu ncftp\n<\/pre>\n\n\n\n<p>or with your package manager.<\/p>\n\n\n\n<p>Then issue this command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ncftpget -R -v -u \"username\" remote-server.com \/local-directory remote-directory\n<\/pre>\n\n\n\n<p>It will ask you for the password.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"using-wget-to-download-files-recursive-mode\"><span id=\"Using_wget_to_download_files_from_ftp_server.2C_recursive_mode\" class=\"mw-headline\">Using wget to download files, recursive mode<\/span><\/h2>\n\n\n<p><b>wget<\/b> is a great tool, and it can also be used with FTP servers, and it also can download files and folders recursively.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wget -r <a class=\"external free\" href=\"ftp:\/\/username:password@remote-server\/\" rel=\"nofollow\" target=\"_blank\">ftp:\/\/username:password@remote-server<\/a>\n<\/pre>\n\n\n\n<p>Or if you want to fetch the files under a particular folder:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wget -r <a class=\"external free\" href=\"ftp:\/\/hostname\/path-to-folder\/\" rel=\"nofollow\" target=\"_blank\">ftp:\/\/hostname\/path-to-folder\/<\/a> --ftp-user=<i>user<\/i> --ftp-password=<i>password<\/i><\/pre>\n\n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-uagb-call-to-action uagb-block-dfb7f37a wp-block-button\"><div class=\"uagb-cta__wrap\"><h3 class=\"uagb-cta__title\">Get 24\/7 AWS Support &amp; Proactive Security \u2013 Stress-Free Hosting!<\/h3><p class=\"uagb-cta__desc\">Maximize ROI with hassle-free AWS hosting. We optimize costs, ensure compliance, and provide round-the-clock support\u2014so you can scale confidently without technical headaches.<\/p><\/div><div class=\"uagb-cta__buttons\"><a href=\"https:\/\/www.veeble.com\/in\/managed-aws-hosting\/\" class=\"uagb-cta__button-link-wrapper wp-block-button__link\" target=\"_blank\" rel=\"noopener noreferrer\">Explore Plans<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M504.3 273.6l-112.1 104c-6.992 6.484-17.18 8.218-25.94 4.406c-8.758-3.812-14.42-12.45-14.42-21.1L351.9 288H32C14.33 288 .0002 273.7 .0002 255.1S14.33 224 32 224h319.9l0-72c0-9.547 5.66-18.19 14.42-22c8.754-3.809 18.95-2.075 25.94 4.41l112.1 104C514.6 247.9 514.6 264.1 504.3 273.6z\"><\/path><\/svg><\/a><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>There are times when sharing files using email as attachments are not possible, and then one of the best ways is to put those [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":8011,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[8],"tags":[],"class_list":["post-213","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ftp"],"uagb_featured_image_src":{"full":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/How-to-recursively-download-folders-via-FTP-Linux-command-line.png",1366,768,false],"thumbnail":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/How-to-recursively-download-folders-via-FTP-Linux-command-line-150x150.png",150,150,true],"medium":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/How-to-recursively-download-folders-via-FTP-Linux-command-line-300x169.png",300,169,true],"medium_large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/How-to-recursively-download-folders-via-FTP-Linux-command-line-768x432.png",768,432,true],"large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/How-to-recursively-download-folders-via-FTP-Linux-command-line-1024x576.png",1024,576,true],"1536x1536":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/How-to-recursively-download-folders-via-FTP-Linux-command-line.png",1366,768,false],"2048x2048":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/How-to-recursively-download-folders-via-FTP-Linux-command-line.png",1366,768,false]},"uagb_author_info":{"display_name":"Vipin Raj","author_link":"https:\/\/www.veeble.com\/kb\/author\/vipin\/"},"uagb_comment_info":0,"uagb_excerpt":"There are times when sharing files using email as attachments are not possible, and then one of the best ways is to put those [&hellip;]","_links":{"self":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/comments?post=213"}],"version-history":[{"count":6,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/213\/revisions"}],"predecessor-version":[{"id":7760,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/213\/revisions\/7760"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media\/8011"}],"wp:attachment":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media?parent=213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/categories?post=213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/tags?post=213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}