Copy and verify a file

Verify the copy at its destination.

Beginner

Lesson goal

Verify the copy at its destination.

How it works

The cp command leaves the source in place. Read the file at the destination after copying. Successfully reading the source alone does not verify the copy.

mkdir work
cp notes/first.txt work/first.txt
cat work/first.txt

Try it

Compare cat output for the original and the copy. For practice, open the missing note exercise.

Check your understanding

How do you verify the copy made it to the working directory?

All lessons
Search Linux DNA

DNA / GUIDANCE

Tux

Hi! Choose your goal and I’ll guide you to the right section.

Local guidance, no external AI or data collection.