codex-lv2-may-2025

Navigation

1 | 2 | 3 | Current Level: 4 | 5 | 6 | 7


Lesson: Move and Rename Files Using mv


Step 1: Rename a File


Step 2: Move the File to the Current Directory


Step 3: Avoid Overwriting Files


Example: Move Multiple Files to Another Directory

Note: these files are not in the lesson data. You do not need to do this part. Just read it and try and guess the answer.

Imagine Jamie has some files she wants to analyze. After running the following commands, Jamie realizes that she put the files sucrose.dat and maltose.dat into the wrong folder. The files should have been placed in the raw folder.

Current structure:

  $ ls -F
  analyzed/  raw/
  $ ls analyzed
  fructose.dat  glucose.dat  maltose.dat  sucrose.dat
  $ cd analyzed

Can you guess the answer?

Click to reveal the answer
    $ mv sucrose.dat maltose.dat ../raw
    

Reflection Questions


Navigation

1 | 2 | 3 | Current Level: 4 | 5 | 6 | 7