Linux Labs

First steps / Stage 7 of 15

Creating and organising files

Not running Starting usually ~20 s
Leave the lesson

Step 8 of 10 · lab · 12 minintroductory

Copy and move files

Backup copies of configs, a new name for the notes and a directory move — cp and mv.

Situation

There is an update on the server tomorrow. A colleague asks you to save the configs from ~/src into ~/backup and tidy ~/src while you are at it: mark the notes as old and move the tmp directory with the build log over to the backups.

Task

Make it so that:

  1. ~/backup holds copies of app.conf and db.conf from ~/src, with the originals left in place;
  2. ~/src/notes.txt gets the new name notes.bak in the same directory;
  3. the ~/src/tmp directory, with everything in it, has moved to ~/backup/tmp.

Lab · on your own

No commands are given in this lab: type them in the terminal yourself. Goals are checked on the machine after every command.

Goals

0 of 3
  • Copies of app.conf and db.conf are in ~/backup, originals still in place — not done yet
  • ~/src/notes.txt renamed to notes.bak — not done yet
  • Directory ~/src/tmp moved to ~/backup/tmp with everything in it — not done yet
Ctrl+Enter
Starts the machine node1 · Ubuntu 24.04

The machine is starting

Hints

0 of 3

Lab goals

0 of 3
  • Copies of app.conf and db.conf are in ~/backup, originals still in place — not done yet
  • ~/src/notes.txt renamed to notes.bak — not done yet
  • Directory ~/src/tmp moved to ~/backup/tmp with everything in it — not done yet
node1 Ubuntu 24.04

Lab goals

0 of 3
  • Copies of app.conf and db.conf are in ~/backup, originals still in place — not done yet
  • ~/src/notes.txt renamed to notes.bak — not done yet
  • Directory ~/src/tmp moved to ~/backup/tmp with everything in it — not done yet
Loading…