Copy, Move and Rename

Linux lab Beginner 4 tasks 10 points

Your inbox directory is a mess. Tidy it up with cp and mv. Use ls (or tree) often to see what you've done.

How it works: the terminal below is a real Linux machine running in your browser. Click it and type. Tasks tick themselves off as you complete them; questions are answered in the box under each task. Press Reset any time for a fresh machine.

student@vulntech:~ Starting…
Getting your Linux machine ready…
The first start downloads about 20 MB. After that your browser keeps it, and labs start in a moment.

Hints

Paths are relative to where you are. Starting in your home folder, the report is inbox/report.txt.

Solution explanation

cp leaves the original where it was; mv doesn't. Renaming is a mv within the same directory. mv accepts several files when the last argument is a directory (mv inbox/*.jpg pictures/ works too). Directories need cp -r.

Show solution
cp inbox/report.txt backup/
mv inbox/notes-draft.txt inbox/notes.txt
mv inbox/photo1.jpg inbox/photo2.jpg pictures/
cp -r projects/game backup/game
HOME LEARN COMMUNITY DASHBOARD