bash copy all files in directory and subdirectories code example Example: bash copy directory and all contents cp -r /path/to/directory /path/to/location/new-name