How Do I Copy a Current Directory in Linux?
Contents How Do I Copy an Entire Directory in Linux? in Order to Copy a Directory on Linux, You Have to Execute the “Cp” Command with the “-R” Option for...
Contents
How do I copy an entire directory in Linux?
In order to copy a directory on Linux, you have to execute the “cp” command with the “-R” option for recursive and specify the source and destination directories to be copied. As an example, let’s say that you want to copy the “/etc” directory into a backup folder named “/etc_backup”.
How do I copy the current directory?
Copying files (cp command)
- To make a copy of a file in the current directory, type the following: cp prog.c prog.bak. …
- To copy a file in your current directory into another directory, type the following: cp jones /home/nick/clients.