C.W.K.
Stream
Lesson 01 of 12 · published

SCP Review

~12 min · scp, limits

Level 0Pinger
0 XP0/101 lessons0/12 achievements
0/150 XP to next level150 XP to go0% complete

Quick recap, then move on

Track 2 covered scp. The summary: it copies single files (or directories with -r) over SSH, looks like cp, and is the right tool for one-off grabs. It is not the right tool for anything bigger because it lacks the four properties you need at scale.

The four things scp can't do

  • Delta transfer — change a single byte in a 1 GB file, scp re-copies the whole thing.
  • Resume — interrupted at 99 %, you start over.
  • Sync semantics — no comparison between source and destination, no "only what changed," no deletions.
  • Exclusions — no way to skip node_modules, .git, build artifacts.

The SCP protocol is also formally deprecated; modern scp commands actually use SFTP under the hood in OpenSSH 9+. So even when you type scp, you're already on a different wire.

Code

scp's natural habitat·bash
# Quick one-off copies
scp file.txt office:/tmp/
scp office:/tmp/log.txt ./

# A small directory
scp -r ./mini-project office:/tmp/

# Anything bigger — switch to rsync

External links

Exercise

Take a directory you've previously scp -r'd between machines and time it: time scp -r big-dir host:/tmp/. Note the duration. In Lesson 5 you'll redo this with rsync and see the difference, especially on a re-run when most files haven't changed.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.