15 February 2013

Code snippet to make a complete copy of all files and directories within a directory in Linux or Unix-based systems using the cp command. In the command above, -r (or -R) flag indicates that cp should copy directories recursively, ensuring that all subdirectories and their contents are also copied.

Source code viewer
  1. # If /home/user does not exist already it will create /home/user/your_folder.
  2. cp -R /etc/your_folder /home/user
Programming Language: Bash