Learn how to duplicate files and directories by copying them to new locations.
- [Instructor] Let's learn how to copy files … and directories in Unix. … Just like we did with move, … we're going to be doing that from the command line. … In the last movie, … we moved a lot of our files into the my_project directory. … If I type ls -l, we'll see what those are. … You can see I've got several files that are in here … as well as a couple of directories. … Let's start by trying to copy this file right here, … file_second.txt. … The way we're going to do that is with the cp command, … short for copy. … Just like we had mv for move, we have cp for copy. … We'll use a space and then we'll take any path to the target … that we want to copy. … The file we want is in the current working directory, … so we can just type its name, file_second.txt. … But we could easily provide a path to a file … that was somewhere else, … either an absolute path or a relative path. … And then we want to put the target. … Where do we want to copy this file to? … Again, it can take a path anywhere on the hard drive, …
Skill Level Intermediate
1. Introduction to Unix
2. Files and Directories
3. Ownership and Permissions
4. Commands and Processes
5. Directing Input and Output
6. Configure Your Working Environment
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.