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.txtTry it
Compare cat output for the original and the copy. For practice, open the missing note exercise.