We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Move

The move command moves a file or directory from one location to another. You can use it to rename a file or to move it to a different directory altogether. If you're moving a directory, it can't be your current working directory.

Renaming a file:

mv draft.md final.md

Moving a file from the current directory to another nested directory:

mv report.csv archives/report.csv

Moving a file from the current directory, to the parent directory:

mv invoice.pdf ../invoice.pdf

If you don't want to rename the file and you're just moving it to a different directory, you can omit the filename:

mv photo.png images/

Assignment

Move the shortterm.txt file from worldbanc/public/products/credit_cards/shortterm.txt, into the worldbanc/public/products/cds directory. Keep the filename the same by using the destination directory path, ending in cds/.

Submit the shell checks.

Both the target and destination have to be valid paths from the current working directory. Use pwd to see where you are and adjust the source and destination paths accordingly. Use ls to verify that the file has been moved correctly. If you mess up the mv command, you'll need to figure out where you accidentally moved the file to, then move it from that location back to where it belongs.