Key Concepts

Review core concepts you need to learn to master this subject

Command Options

Options can be used to modify the behavior of shell commands. Shell command options are commonly represented by a single letter preceded by a -. For example, -l, -a, and -d could all be options that follow a shell command.

List contents in a directory

The ls shell command is used to list the contents in a directory.

Copy Files and Directories

The cp command is used to copy files or directories.

The basic argument structure is cp source destination, where the source is the file or directory to copy to the destination file or directory.

mv shell command

Files can be moved using the mv shell command.

Delete files and directories

The rm shell command is used to delete files and directories. The -r flag deletes a directory and all of its files and directories (rm -r).

Lesson 1 of 1
  1. 1

    So far we’ve used the command line to navigate the filesystem. We can do more with the command line to view directories and files. We can also use the command line to copy, move, and remove files …

  2. 2

    […] 1. The […] command lists all files and directories in the working directory. 2. The […] modifies the behavior of the […] command to also list the files and directories startin…

  3. 3

    […] The […] option lists files and directories as a table. Here there are four rows, with seven columns separated by spaces. Here’s what each column means: 1. Access rights. These are act…

  4. 4

    […] The […] option orders files and directories by the time they were last modified. In addition to using each option separately, like […] or […] , multiple options can be used tog…

  5. 5

    […] The […] command copies files or directories. Here, we copy the contents of frida.txt into lincoln.txt.

  6. 6

    […] To copy a file into a directory, use […] with the source file as the first argument and the destination directory as the second argument. Here, we copy the file *biopic/cleopatra.txt

  7. 7

    […] In addition to using filenames as arguments, we can use special characters like […] to select groups of files. These special characters are called wildcards. The […] selects all…

  8. 8

    The […] command moves files. It’s similar to […] in its usage. […] To move a file into a directory, use […] with the source file as the first argument and the destination director…

  9. 9

    […] The […] command deletes files and directories. Here we remove the file waterboy.txt from the filesystem. […] The […] is an option that modifies the behavior of the [……

  10. 10

    Congratulations! You learned how to use the command line to view and manipulate the filesystem. What can we generalize so far? Options modify the behavior of commands: […] lists all cont…

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo