From the course: Linux: Files and Permissions

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Copying files and dirs

Copying files and dirs

- [Instructor] Everyday file management requires us to copy files and directories. We can do these tasks from the GUI but they're usually faster on the command line. Let's look at the syntax of the copy command. The command name is cp. The options can take the form of single letters, proceeded by a hyphen or complete words proceeded by two hyphens. If they are a single letters, they can be combined into one sequence, for instance, dash pf. The source path is the path to the file you want to make a copy of. The paths can either be absolute or relative. In this example, I've used the relative path with the tilde shortcut to my home directory. If you want a copy of multiple files just separate them with spaces. You can also use file globbing or brace expansion covered in this course to match multiple files. The destination path is where you want the file copied to. Just like the source path, this can either be absolute…

Contents