![見出し画像](https://assets.st-note.com/production/uploads/images/93922892/rectangle_large_type_2_e01ded8fdc618cb80f5e91d506ab6cc4.png?width=1200)
The scp command is too awesome.
My name is Kotaro Nakane, and I work as a director at Definer Inc.
This time, I would like to talk about the scp command on linux.
I want to send files between servers
I think there is a certain number of people in development with this kind of demand.
I too ran into this requirement during my first year as a new graduate, and I was worried, "Don't tell me you have to work hard and copy and paste one file at a time?" I was worried.
Of course, that is not true; you can transfer files effortlessly using the scp command.
Familiarize yourself with the scp command
The scp command is a cp (copy) command using ssh.
(Therefore, as with SSH connections, access to port 22 must be allowed.)
The scp command is written with the following syntax
scp [option] [source path] [destination path]
This is confusing, so I will give some concrete examples
(Example 1) Copying the local test.txt file to the home directory of the ubuntu user on the server whose IP address is 10.0.0.5
scp test.txt ubuntu@10.0.0.5:~/
(Example 2) Copy the remote test.txt file to the local current directory
scp ubuntu@10.0.0.5:~/test.txt . /
Another well-known option is
[p] to preserve the timestamp and permissions of the copy source
[r] to copy recursively
I encourage everyone to try using the scp command for effortless file exchange!
For those who have read this
If you have read this far, I am sure we share some values, and I would be very happy if we could talk casually first.
Definer, Inc. is looking for people to work with.
株式会社Definerでは一緒に働く仲間を募集しています
人事・経営・sennryaku
ソフトウェアエンジニア
カジュアル面談です
開発
ソフトウェアエンジニア
フルスタックエンジニア
プロダクトマネージャー(PdM)
ビジネス
人事・経営・sennryaku
ビジネスオープンポジション
インサイドセールス(マネジメント)
その他
カジュアル面談です
この記事が気に入ったらサポートをしてみませんか?