MOTD ⚙ CHAPTERS 01 / 05
TODAY'S QUIZ0 / 5 STREAK0 days POINTS0 THE OPERATOROpen

$man 1 mv

Ten things the page says. Every one of them is on your machine right now — run the command above and check.

  1. 01

    Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.[man]

  2. 02
    --backup[=CONTROL]

    make a backup of each existing destination file.[man]

  3. 03
    -b

    like --backup but does not accept an argument.[man]

  4. 04
    --strip-trailing-slashes

    remove any trailing slashes from each SOURCE argument.[man]

  5. 05
    --update[=UPDATE]

    control which existing files are updated; UPDATE={all,none,older(default)}. See below.[man]

  6. 06
    -Z, --context

    set SELinux security context of destination file to default type.[man]

  7. 07

    Mandatory arguments to long options are mandatory for short options too.[man]

  8. 08

    If you specify more than one of -i, -f, -n, only the final one takes effect.[man]

  9. 09

    UPDATE controls which existing files in the destination are replaced.[man]

  10. 10

    none is similar to the --no-clobber option, in that no files in the destination are replaced, but also skipped files do not induce a failure.[man]

$run --yourself

Move a file and refuse to clobber one

mv overwrites without asking and there is no undo. -n and -i are the difference between a rename and a data loss.

These commands write files, so run them in a scratch directory:

$ mkdir -p ~/motd-lab && cd ~/motd-lab
~/motd-lab
$ echo keep > important.txt
$ echo junk > temp.txt
$ mv -vn temp.txt important.txt
$ cat important.txt
$ mv -v temp.txt renamed.txt

WHAT YOU SHOULD SEEThe first mv does nothing, because -n will not overwrite. important.txt still says keep. The second mv renames temp.txt and says so.

$quiz -n 5

Five questions, each one taking a term out of a line above. Ten points for each. Tap hear it to have a question read to you; answering plays the verdict.

QUESTION 1 OF 5

Which term completes this line from the page? “Rename SOURCE to DEST, or move SOURCE(s) to _____.”

From point 1 above.

QUESTION 2 OF 5

Which term completes this line from the page? “like --backup but does not accept an _____.”

From point 3 above.

QUESTION 3 OF 5

Which term completes this line from the page? “control which existing files are updated; _____={all,none,older(default)}. See below.”

From point 5 above.

QUESTION 4 OF 5

Which term completes this line from the page? “_____ arguments to long options are mandatory for short options too.”

From point 7 above.

QUESTION 5 OF 5

Which term completes this line from the page? “UPDATE _____ which existing files in the destination are replaced.”

From point 9 above.

Answer all five to bank your points.

$play --chapters 5

Five chapters, three voices. Tap one to jump — the player at the bottom of the screen follows.

download the full edition

$tee --everyone

Know someone with ten minutes and a terminal? Send them today's page. This is the card that appears when you post it:

Share card for mv(1): move (rename) files
2026-10-05 · 1200×630

$su - operator

The Operator has a dispatch on mv(1), and he files them for subscribers only. It is free. Join the club, or read about the series.

MOTD is a weekday reading of one manual page already installed on your own machine. Every statement is quoted from that page or from the GNU info documentation beside it, and every edition names the command that shows you the source.

archive · the operator · about · podcast · Feline Union

NARRATION · 3 VOICES · 01
Last login