YouTube2Text

Linux Commands for Beginners 23 - Transferring Files with scp — Transcript

by Learn Linux TV · 1,691 words · 222 segments · language en · Watch on YouTube

Full transcript

  1. 0:00[Music]
  2. 0:20hello once again everybody this is Jay
  3. 0:23with another linux commands for
  4. 0:25beginners video and in this video we're
  5. 0:28going to take a look at transferring
  6. 0:30files from one Linux machine to another
  7. 0:33so you will need two linux instances for
  8. 0:37this video it doesn't matter if they're
  9. 0:39both virtual machines one physical one
  10. 0:41virtual both cloud instances one cloud
  11. 0:43instance um it really doesn't matter so
  12. 0:46long as you have two Linux machines to
  13. 0:49work from and then I'll show you
  14. 0:50examples of copying files from one
  15. 0:52server to the other we're going to use
  16. 0:55the secure copy protocol or SCP to
  17. 0:58achieve that in this video so let's go
  18. 1:00ahead and get started
  19. 1:02so here on my terminal I have a shell
  20. 1:06open from my local workstation or my
  21. 1:09local laptop you can see my customize
  22. 1:11prompt with a cute little unicorn right
  23. 1:13here and this is where my local files
  24. 1:16are that I'm going to copy to another
  25. 1:18instance it doesn't really matter what
  26. 1:21you copy I'm going to show you a few
  27. 1:23examples here but you can go ahead and
  28. 1:26use whatever files you'd like so I
  29. 1:28recently recorded a video on retropie
  30. 1:30which is a very awesome distribution and
  31. 1:33also application that you can run on
  32. 1:36your Linux installation on a laptop or a
  33. 1:38desktop to play some retro games and I
  34. 1:41have all those files still on my laptop
  35. 1:43so I'm going to use those as an example
  36. 1:45again it doesn't really matter what you
  37. 1:47use so if I list storage on my home
  38. 1:48directory here I have all kinds of
  39. 1:52folders here and the one I'm interested
  40. 1:54in is this retropie folder I'm going to
  41. 1:57go ahead and go in there and you can see
  42. 2:01I have a roms directory inside there I
  43. 2:07have a bunch of folders for various
  44. 2:10emulated games that are supported by
  45. 2:13retropie I'm going to use NES as an
  46. 2:16example so if I go into the NES folder I
  47. 2:21have a bunch of files here so I've made
  48. 2:25my text really big here so some of these
  49. 2:28names are going to be wrapped I'm sorry
  50. 2:29about that but the name of these games
  51. 2:32doesn't really matter be
  52. 2:33because the type of content doesn't
  53. 2:35really matter the whole point is to show
  54. 2:37you guys how to transfer files it
  55. 2:39doesn't really matter what files you use
  56. 2:41those files are just what I have
  57. 2:43available at the time so as an example
  58. 2:45I'm going to copy this file and I'll
  59. 2:48just do an LS against it
  60. 2:50a game called Yoshi for the NES we see
  61. 2:56that file is right here it's 257
  62. 2:58kilobytes that's the file that I'm going
  63. 3:01to transfer now over here in another tab
  64. 3:03I have an Ubuntu instance on Linode
  65. 3:06again it doesn't matter where it is you
  66. 3:08just need to have access to it if I do
  67. 3:10IP space a my IP address for this
  68. 3:14instance is going to be this one right
  69. 3:16here I'm going to need to know that to
  70. 3:20copy a file or a folder over to this
  71. 3:23instance now currently I have nothing so
  72. 3:27if I go back here to my local instance
  73. 3:29what I'm going to do is SCP secure copy
  74. 3:34protocol and that comes from the SSH
  75. 3:37package so if you have the SSH client
  76. 3:39installed you should already have that
  77. 3:41installed as well so you should already
  78. 3:43have this command the file that I want
  79. 3:45to copy again is Yoshi NES and I want to
  80. 3:49copy it too I'll put in the username and
  81. 3:50then at that's the IP address and I'll
  82. 3:53put a colon slash home slash J so may
  83. 3:57break this down for you SCP secure copy
  84. 4:00protocol that's the tool we're going to
  85. 4:03use to transfer the file the file we
  86. 4:05want to transfer is this one Yoshi NES
  87. 4:08the user we want to use for this
  88. 4:12transfer is my user J at the IP address
  89. 4:16of the server that's going to receive
  90. 4:18the file colon and then the path on that
  91. 4:21server where the file is going to
  92. 4:23ultimately be copied to I'll press Enter
  93. 4:27it's going to ask for my password which
  94. 4:29I'll put in and it copied it over since
  95. 4:34NES files are very small then of course
  96. 4:37that's going to copy pretty quick so if
  97. 4:39I go back over here to my server you can
  98. 4:42see that I do have that file here Yoshi
  99. 4:44dot and yes
  100. 4:46that is present that was not there
  101. 4:48before back here at the local session
  102. 4:52I'm going to recall that command again
  103. 4:55there it is and now here I'm going to
  104. 4:57remove the file you see that it's not
  105. 5:00there anymore I'm gonna copy it back but
  106. 5:05what I'm going to do is I'm going to
  107. 5:07shorten this down a little bit I'm going
  108. 5:09to leave off my name at and just have
  109. 5:11the IP address because if you are logged
  110. 5:14in as the user you want to copy the file
  111. 5:16with you don't need to include the
  112. 5:18username you only need to include the
  113. 5:20username if the user on the other end is
  114. 5:22different than the user on your local
  115. 5:24session so in this case I just need the
  116. 5:27IP address and what I can also do is I
  117. 5:29could take off the path so I'm not even
  118. 5:31going to tell it where I want to copy
  119. 5:33the file to so let's just see what
  120. 5:34happens if I leave the path off of the
  121. 5:36command put in the password again and it
  122. 5:41copied it so let's see what happened my
  123. 5:44working directory is slash home slash J
  124. 5:47and there's the file so how did it know
  125. 5:49to copy it to that directory to my home
  126. 5:51directory well actually if you don't
  127. 5:55give it a path that is going to assume
  128. 5:58your home directory is where you want to
  129. 6:01put it so you only actually need to
  130. 6:03include a path if where you want to
  131. 6:05transfer the file is in a different
  132. 6:07location than your home directory now
  133. 6:10I'm going to go back a directory here
  134. 6:12and I want to copy the entire NES
  135. 6:16directory over to that other server so
  136. 6:18here's what I'm gonna do SCP I'm gonna
  137. 6:21use - R for recursive because I want to
  138. 6:24copy everything underneath a particular
  139. 6:26folder and that's the folder I want to
  140. 6:29copy the NES folder and again I want to
  141. 6:32copy it to this IP address I'm not going
  142. 6:34to put my user name here again because
  143. 6:36I'm logged in as the same user and I'm
  144. 6:38going to use a colon because you know
  145. 6:40we'll just put it in the home directory
  146. 6:42I'm not going to designate a place so
  147. 6:43I'll press Enter
  148. 6:44type the password and it's going to copy
  149. 6:48everything over there and as I go I
  150. 6:53could do I could go into the NES
  151. 6:54directory which is now there
  152. 6:57you can see that it's basically going to
  153. 7:00have a bunch of files that's going to
  154. 7:02change a bit as ILS as it copies
  155. 7:04additional files it's not necessarily
  156. 7:06going to go in alphabetical order but it
  157. 7:09is copying everything over there as you
  158. 7:11can see is copying my entire NES ROM
  159. 7:14library over to that other server as you
  160. 7:18can see here they're all present and
  161. 7:21again that was the NES directory that I
  162. 7:25copied over I'll go back here and what
  163. 7:29I'm gonna do is go back to my home
  164. 7:31directory so now I'm in my home
  165. 7:34directory now one thing you should know
  166. 7:36is that SCP also works in Reverse
  167. 7:38believe it or not so I could do SCP I'll
  168. 7:42type the IP address and I did copy the
  169. 7:46Yoshi
  170. 7:46NES file into my home directory on the
  171. 7:49other server as you can see if I do LS
  172. 7:52well actually it's still here you see
  173. 7:54Yoshi NES and here what we're going to
  174. 7:58do is try to copy the file from that
  175. 8:00server over to my local workstation so
  176. 8:03I'll put a period which is basically the
  177. 8:06current working directory I just want to
  178. 8:08copy it where I am right now and I'll
  179. 8:10press Enter put in the password and it
  180. 8:16actually copied the Yoshida NES file
  181. 8:18from the remote end to the local end so
  182. 8:21it actually works in Reverse as well so
  183. 8:24that's basically it there's more you can
  184. 8:26do with the SCP command there's other
  185. 8:28options I can give you but I'll leave it
  186. 8:30up to you to check the man page for
  187. 8:32example you could designate a port for
  188. 8:35the other side SSH runs on port 22 which
  189. 8:38is assumed if you don't designate a pork
  190. 8:41if the ssh server is running on a
  191. 8:43different port on the server itself
  192. 8:45you'll have to designate that i'll leave
  193. 8:47it up to you to check the main page to
  194. 8:48find out what option you would use to
  195. 8:50achieve that but i basically showed you
  196. 8:53how to copy a file and a folder from one
  197. 8:56instance to another i hope that was
  198. 8:58helpful for you guys I know it might be
  199. 9:00strange to copy rom files but it's what
  200. 9:03I had I just wanted to show you guys how
  201. 9:05that process worked and in the next
  202. 9:07video I'm going to show you basically
  203. 9:09the same exact thing again
  204. 9:11but we're going to use the arcing
  205. 9:13command to achieve this which is another
  206. 9:16method of copying files from one Linux
  207. 9:19instance to another and I should have
  208. 9:21that uploaded very soon so stay tuned
  209. 9:24thanks for checking out my video I
  210. 9:27really appreciate it if you found it
  211. 9:28useful click that like button and if you
  212. 9:31haven't already done so make sure you
  213. 9:33subscribe so you'll see the latest
  214. 9:35content as soon as it becomes available
  215. 9:37if you want to help me out there's links
  216. 9:39down below for my patreon page as well
  217. 9:42as links for purchasing my Linux books
  218. 9:45and also my affiliate store which has a
  219. 9:47listing of Linux compatible hardware
  220. 9:49that I've actually tested personally
  221. 9:52thanks again for watching and I'll see
  222. 9:54you in the next video

About this transcript

This page contains the full transcript of Linux Commands for Beginners 23 - Transferring Files with scp by Learn Linux TV, generated from the public captions YouTube serves with the video. The transcript has 1,691 words across 222 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.