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 - Linux Tutorial
From the course: Linux: Files and Permissions
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Understanding filesystem paths4m 18s
-
(Locked)
Creating files and dirs4m 38s
-
(Locked)
Copying files and dirs4m 39s
-
(Locked)
Moving and renaming files and dirs4m 11s
-
(Locked)
Deleting files and dirs3m 44s
-
(Locked)
Creating links to files and dirs6m 24s
-
(Locked)
Making file manipulation safe2m 12s
-
(Locked)
Challenge: Linux files3m 21s
-
(Locked)
Solution: Linux files3m 45s
-
-
-
-