{"id":2322,"date":"2014-09-22T17:10:26","date_gmt":"2014-09-22T13:10:26","guid":{"rendered":"https:\/\/blog.alwawee.ru\/?p=2322"},"modified":"2014-11-08T18:57:51","modified_gmt":"2014-11-08T14:57:51","slug":"using-scp-instead-ftp","status":"publish","type":"post","link":"https:\/\/blog.alwawee.ru\/?p=2322","title":{"rendered":"Using SCP instead of FTP"},"content":{"rendered":"<p><a href=\"https:\/\/blog.alwawee.ru\/wp-content\/uploads\/2014\/09\/scp.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.alwawee.ru\/wp-content\/uploads\/2014\/09\/scp.png\" alt=\"scp\" width=\"280\" height=\"280\" class=\"aligncenter size-full wp-image-2328\" srcset=\"https:\/\/blog.alwawee.ru\/wp-content\/uploads\/2014\/09\/scp.png 280w, https:\/\/blog.alwawee.ru\/wp-content\/uploads\/2014\/09\/scp-150x150.png 150w\" sizes=\"auto, (max-width: 280px) 100vw, 280px\" \/><\/a><\/p>\n<p>I tried to delete a folder that contained tons of localization folders and waited for a very long time, since I was using FTP client and it was very slow during deleting and copying folders with massive amount of subfolders and files. That is why I decided to find another way to delete and copy files faster to the remote server from my local computer. <\/p>\n<p><strong>Secure copy or SCP<\/strong> is a means of securely transferring computer files between a local host and a remote host or between two remote hosts. It is based on the <strong>Secure Shell (SSH)<\/strong> protocol.<\/p>\n<p><strong>SCP<\/strong> is more secure that plain <strong>FTP<\/strong>. It also allows to copy directly to the given folder on server, if permissions granted. <strong>FTP<\/strong> allows to copy only to the <strong>FTP<\/strong> folder. <\/p>\n<p><a href=\"https:\/\/blog.alwawee.ru\/wp-content\/uploads\/2014\/09\/AP_scp.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.alwawee.ru\/wp-content\/uploads\/2014\/09\/AP_scp-300x207.jpg\" alt=\"AP_scp\" width=\"300\" height=\"207\" class=\"aligncenter size-medium wp-image-2327\" srcset=\"https:\/\/blog.alwawee.ru\/wp-content\/uploads\/2014\/09\/AP_scp-300x207.jpg 300w, https:\/\/blog.alwawee.ru\/wp-content\/uploads\/2014\/09\/AP_scp.jpg 500w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>These are the commands. <\/p>\n<p>To copy files from server to your local machine: <\/p>\n<pre>\r\nscp -r root@lovecakes.ru:\/root\/www\/ladby.ru .\r\n<\/pre>\n<p>To copy files from your local machine to the server: <\/p>\n<pre>\r\nscp wordpress-4.0.zip root@lovecakes.ru:\/root\/www\/test.ladby.ru\r\n<\/pre>\n<p>To go to the folder with a folder, that will be copied (in my case it is <strong>common-app-server<\/strong> folder): <\/p>\n<pre>\r\n$ cd ~\/Documents\r\n<\/pre>\n<p>To archive a folder, so that not to include Mac OS X system files like <strong>.DS_Store<\/strong><\/p>\n<pre>\r\n~\/Documents: $ zip common-app-server.zip common-app-server\/ -x \"*.DS_Store\"\r\n<\/pre>\n<p>To remove a folder from server before copying a new version:<\/p>\n<pre>\r\n# rm -rf common-app-server\r\n<\/pre>\n<p>To copy zip file using <strong>SCP<\/strong>: <\/p>\n<pre>\r\n$ scp common-app-server.zip root@lovecakes.ru:\/var\/www\/den.ladby.ru\/public\r\n<\/pre>\n<p>Here <strong>root<\/strong> is a user name, that has permission to write to the destination folder.<br \/>\n<strong>lovecakes.ru<\/strong> &#8211; server name<br \/>\n<strong>\/var\/www\/den.ladby.ru\/public<\/strong> &#8211; destination folder<\/p>\n<p>To install zip on server:<\/p>\n<pre>\r\n# sudo apt-get install unzip\r\n<\/pre>\n<p>To unzip copied folder on server:<\/p>\n<pre>\r\n# unzip common-app-server.zip -d\r\n<\/pre>\n<p>To remove MACOSX folder:<\/p>\n<pre>\r\n# rm -rf __MACOSX\r\n<\/pre>\n<p>To remove zip file on server and local machine after unzipping:<\/p>\n<pre>\r\n# rm common-app-server.zip\r\n<\/pre>\n<p>To copy a folder without archiving: <\/p>\n<pre>\r\n$ scp -r common-app-server root@lovecakes.ru:\/var\/www\/den.ladby.ru\/public\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I tried to delete a folder that contained tons of localization folders and waited for a very long time, since I was using FTP client and it was very slow during deleting and copying folders with massive amount of subfolders and files. That is why I decided to find another way to delete and copy [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[74],"tags":[130,129,131,128],"class_list":["post-2322","post","type-post","status-publish","format-standard","hentry","category-web-development","tag-ftp","tag-scp","tag-ssh","tag-zip"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using SCP instead of FTP - Denis Kutlubaev<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.alwawee.ru\/?p=2322\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using SCP instead of FTP - Denis Kutlubaev\" \/>\n<meta property=\"og:description\" content=\"I tried to delete a folder that contained tons of localization folders and waited for a very long time, since I was using FTP client and it was very slow during deleting and copying folders with massive amount of subfolders and files. That is why I decided to find another way to delete and copy [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.alwawee.ru\/?p=2322\" \/>\n<meta property=\"og:site_name\" content=\"Denis Kutlubaev\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/alwaweemobile\" \/>\n<meta property=\"article:published_time\" content=\"2014-09-22T13:10:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-11-08T14:57:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.alwawee.ru\/wp-content\/uploads\/2014\/09\/scp.png\" \/>\n<meta name=\"author\" content=\"Denis Kutlubaev\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Denis Kutlubaev\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/?p=2322#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/?p=2322\"},\"author\":{\"name\":\"Denis Kutlubaev\",\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/#\\\/schema\\\/person\\\/58f1f1f57155b48afab83ba53b3e26a7\"},\"headline\":\"Using SCP instead of FTP\",\"datePublished\":\"2014-09-22T13:10:26+00:00\",\"dateModified\":\"2014-11-08T14:57:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/?p=2322\"},\"wordCount\":272,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/?p=2322#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog.alwawee.ru\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/scp.png\",\"keywords\":[\"FTP\",\"SCP\",\"SSH\",\"zip\"],\"articleSection\":[\"Web Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/blog.alwawee.ru\\\/?p=2322#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/?p=2322\",\"url\":\"https:\\\/\\\/blog.alwawee.ru\\\/?p=2322\",\"name\":\"Using SCP instead of FTP - Denis Kutlubaev\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/?p=2322#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/?p=2322#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog.alwawee.ru\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/scp.png\",\"datePublished\":\"2014-09-22T13:10:26+00:00\",\"dateModified\":\"2014-11-08T14:57:51+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/#\\\/schema\\\/person\\\/58f1f1f57155b48afab83ba53b3e26a7\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/?p=2322#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blog.alwawee.ru\\\/?p=2322\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/?p=2322#primaryimage\",\"url\":\"https:\\\/\\\/blog.alwawee.ru\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/scp.png\",\"contentUrl\":\"https:\\\/\\\/blog.alwawee.ru\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/scp.png\",\"width\":280,\"height\":280},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/?p=2322#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blog.alwawee.ru\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using SCP instead of FTP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/#website\",\"url\":\"https:\\\/\\\/blog.alwawee.ru\\\/\",\"name\":\"Denis Kutlubaev\",\"description\":\"iOS Development\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blog.alwawee.ru\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/#\\\/schema\\\/person\\\/58f1f1f57155b48afab83ba53b3e26a7\",\"name\":\"Denis Kutlubaev\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/346de75d27c818be0aa7fddeada2e50e30cc15b4da6b3b8110c5d766cd2afa34?s=96&d=mm&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/346de75d27c818be0aa7fddeada2e50e30cc15b4da6b3b8110c5d766cd2afa34?s=96&d=mm&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/346de75d27c818be0aa7fddeada2e50e30cc15b4da6b3b8110c5d766cd2afa34?s=96&d=mm&r=pg\",\"caption\":\"Denis Kutlubaev\"},\"description\":\"iOS Developer, creator of Tornado Browser and many other popular apps\",\"sameAs\":[\"http:\\\/\\\/dennis.alwawee.com\"],\"url\":\"https:\\\/\\\/blog.alwawee.ru\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using SCP instead of FTP - Denis Kutlubaev","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.alwawee.ru\/?p=2322","og_locale":"en_US","og_type":"article","og_title":"Using SCP instead of FTP - Denis Kutlubaev","og_description":"I tried to delete a folder that contained tons of localization folders and waited for a very long time, since I was using FTP client and it was very slow during deleting and copying folders with massive amount of subfolders and files. That is why I decided to find another way to delete and copy [&hellip;]","og_url":"https:\/\/blog.alwawee.ru\/?p=2322","og_site_name":"Denis Kutlubaev","article_publisher":"https:\/\/www.facebook.com\/alwaweemobile","article_published_time":"2014-09-22T13:10:26+00:00","article_modified_time":"2014-11-08T14:57:51+00:00","og_image":[{"url":"https:\/\/blog.alwawee.ru\/wp-content\/uploads\/2014\/09\/scp.png","type":"","width":"","height":""}],"author":"Denis Kutlubaev","twitter_misc":{"Written by":"Denis Kutlubaev","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.alwawee.ru\/?p=2322#article","isPartOf":{"@id":"https:\/\/blog.alwawee.ru\/?p=2322"},"author":{"name":"Denis Kutlubaev","@id":"https:\/\/blog.alwawee.ru\/#\/schema\/person\/58f1f1f57155b48afab83ba53b3e26a7"},"headline":"Using SCP instead of FTP","datePublished":"2014-09-22T13:10:26+00:00","dateModified":"2014-11-08T14:57:51+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.alwawee.ru\/?p=2322"},"wordCount":272,"commentCount":0,"image":{"@id":"https:\/\/blog.alwawee.ru\/?p=2322#primaryimage"},"thumbnailUrl":"https:\/\/blog.alwawee.ru\/wp-content\/uploads\/2014\/09\/scp.png","keywords":["FTP","SCP","SSH","zip"],"articleSection":["Web Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.alwawee.ru\/?p=2322#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.alwawee.ru\/?p=2322","url":"https:\/\/blog.alwawee.ru\/?p=2322","name":"Using SCP instead of FTP - Denis Kutlubaev","isPartOf":{"@id":"https:\/\/blog.alwawee.ru\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.alwawee.ru\/?p=2322#primaryimage"},"image":{"@id":"https:\/\/blog.alwawee.ru\/?p=2322#primaryimage"},"thumbnailUrl":"https:\/\/blog.alwawee.ru\/wp-content\/uploads\/2014\/09\/scp.png","datePublished":"2014-09-22T13:10:26+00:00","dateModified":"2014-11-08T14:57:51+00:00","author":{"@id":"https:\/\/blog.alwawee.ru\/#\/schema\/person\/58f1f1f57155b48afab83ba53b3e26a7"},"breadcrumb":{"@id":"https:\/\/blog.alwawee.ru\/?p=2322#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.alwawee.ru\/?p=2322"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.alwawee.ru\/?p=2322#primaryimage","url":"https:\/\/blog.alwawee.ru\/wp-content\/uploads\/2014\/09\/scp.png","contentUrl":"https:\/\/blog.alwawee.ru\/wp-content\/uploads\/2014\/09\/scp.png","width":280,"height":280},{"@type":"BreadcrumbList","@id":"https:\/\/blog.alwawee.ru\/?p=2322#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.alwawee.ru\/"},{"@type":"ListItem","position":2,"name":"Using SCP instead of FTP"}]},{"@type":"WebSite","@id":"https:\/\/blog.alwawee.ru\/#website","url":"https:\/\/blog.alwawee.ru\/","name":"Denis Kutlubaev","description":"iOS Development","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.alwawee.ru\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.alwawee.ru\/#\/schema\/person\/58f1f1f57155b48afab83ba53b3e26a7","name":"Denis Kutlubaev","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/346de75d27c818be0aa7fddeada2e50e30cc15b4da6b3b8110c5d766cd2afa34?s=96&d=mm&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/346de75d27c818be0aa7fddeada2e50e30cc15b4da6b3b8110c5d766cd2afa34?s=96&d=mm&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/346de75d27c818be0aa7fddeada2e50e30cc15b4da6b3b8110c5d766cd2afa34?s=96&d=mm&r=pg","caption":"Denis Kutlubaev"},"description":"iOS Developer, creator of Tornado Browser and many other popular apps","sameAs":["http:\/\/dennis.alwawee.com"],"url":"https:\/\/blog.alwawee.ru\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=\/wp\/v2\/posts\/2322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2322"}],"version-history":[{"count":2,"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=\/wp\/v2\/posts\/2322\/revisions"}],"predecessor-version":[{"id":2414,"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=\/wp\/v2\/posts\/2322\/revisions\/2414"}],"wp:attachment":[{"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}