Moving a file

Verify both paths after a move.

Power User

Lesson goal

Verify both paths after a move.

How it works

mv moves or renames a file. Inspect the destination first, then verify the contents and the original path.

mkdir ~/archive
cp ~/notes/first.txt ~/draft.txt
mv ~/draft.txt ~/archive/final.txt
ls ~/archive

Try it

Repeat in the terminal and open the new file with cat.

Check your understanding

Which command shows the contents after a move?

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.