Linux Labs

First steps / Stage 7 of 15

Creating and organising files

Not running Starting usually ~20 s
Leave the lesson

Step 10 of 10 · summary · 2 min

Summary

  • Before copying or moving, look at what already has the destination's name: a directory, a file or nothing.
  • cp leaves the source in place and mv takes it away; a directory created in advance, a trailing slash and -i protect against silent replacement.
  • A pattern in rm comes after ls with the same pattern, and cleaning a directory comes after a cp -r copy.
  • The state after a command shows the result — ls -l and cat, not the absence of messages.
  • The drafts at the start of the lesson vanished without a single error: archive was not a directory, so both mv commands read it as a file name.
Ubuntu 24.04
Loading…