

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: What Is a Filesystem?
incomplete
2: Filepaths
incomplete
3: Parent Directories
incomplete
4: Absolute vs. Relative Paths
incomplete
5: Files
incomplete
6: Tab Completion
incomplete
7: head and tail
incomplete
8: More and Less
incomplete
9: Touch
incomplete
10: Directories
incomplete
11: Move
incomplete
12: Remove
incomplete
13: Copy
incomplete
14: Home
incomplete
15: Grep
incomplete
16: grep Multiple Files
incomplete
17: Find
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
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/
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.