The option you’re looking for is -R
.
cp -R path_to_source path_to_destination/
- If
destination
doesn’t exist, it will be created. -R
meanscopy directories recursively
. You can also use-r
since it’s case-insensitive.- To copy everything inside the source folder (symlinks, hidden files) without copying the source folder itself use
-a
flag along with trailing/.
in the source (as per@muni764
‘s /@Anton Krug
‘s comment):
cp -a path_to_source/. path_to_destination/
Related Posts:
- How to open a “-” dashed filename using terminal?
- Amazon Linux: apt-get: command not found
- Reread partition table without rebooting?
- Python Math – TypeError: ‘NoneType’ object is not subscriptable
- Sleep for milliseconds
- TCP vs UDP – What is a TCP connection? [duplicate]
- Eclipse IDE for Java – Full Dark Theme
- What does the Java assert keyword do, and when should it be used?
- HTTP POST and GET using cURL in Linux [duplicate]
- How to accept space in regex?
- Is a wildcard CNAME DNS record valid?
- What is the meaning of *nix?
- File extension .DB – What kind of database is it exactly?
- How to resolve “The requested URL was rejected. Please consult with your administrator.”
- “Couldn’t find a file descriptor referring to the console” on Ubuntu bash on Windows
- What is the difference between a strongly typed language and a statically typed language?
- How can I recursively find all files in current and subfolders based on wildcard matching?
- Error in Python script “Expected 2D array, got 1D array instead:”?
- segmentation fault 11 in C++ on Mac
- How to append text to a text file in C++?
- expected assignment or function call: no-unused-expressions ReactJS
- How to install grub after installing Windows 10
- How do I learn WebGL the fast way?
- How to print pthread_t
- What is the meaning of t=”shared” in a formula element?
- MySQL Every derived table must have its own alias
- How to print out a backslash in LaTeX
- mysql_config not found when installing mysqldb python interface
- Linux error while loading shared libraries: cannot open shared object file: No such file or directory
- Shell command to tar directory excluding certain files/folders
- AttributeError: can’t set attribute
- How to kill a running Spark application?
- QEMU: /bin/sh: can’t access tty; job control turned off
- Meaning of exit status 1 returned by linux command
- Log to the base 2 in python
- fix java.net.SocketTimeoutException: Read timed out
- using pip3: module “importlib._bootstrap” has no attribute “SourceFileLoader”
- Sqoop Incremental Import
- What does it mean by word size in computer?
- Python setup.py develop vs install
- Hidden field “ufprt” being added to Razor Umbraco Form – Why?
- mysql_config not found when installing mysqldb python interface
- Android setOnClickListener method – How does it work?
- Convert a CERT/PEM certificate to a PFX certificate
- What is process.env.PORT in Node.js?
- linux command to get size of files and directories present in a particular folder?
- enum to string in modern C++11 / C++14 / C++17 and future C++20
- ORA-29913: error in executing ODCIEXTTABLEOPEN callout when inserting csv into oracle
- ./configure : /bin/sh^M : bad interpreter
- How do I get monitor resolution in Python?
- git: fatal unable to auto-detect email address
- R error which says “Models were not all fitted to the same size of dataset”
- Yum fails with – There are no enabled repos.
- Unable to establish SSL connection upon wget on Ubuntu 14.04 LTS
- simple IPython example raises exception on sys.exit()
- How to get a minecarft session ID?
- Factory Pattern. When to use factory methods?
- How to send a PUT/DELETE request in jQuery?
- What does set -e mean in a bash script?
- Which font is used in MS-DOS?
- php_network_getaddresses: getaddrinfo failed: Name or service not known (0) Failed To Connect..!
- C++ error: undefined reference to ‘clock_gettime’ and ‘clock_settime’
- Google Gmail – “The conversation that you requested could not be loaded”
- apt-get for Cygwin?
- How to set JAVA_HOME in Linux for all users
- Python: What OS am I running on?
- ER-Diagram: Ternary Relationship – How to read properly?
- How can I diff 2 files while ignoring leading white space
- Converting time stamps in excel to dates
- The name ‘InitializeComponent’ does not exist in the current context
- Why define PI = 4*ATAN(1.d0)
- Difference between exec, execvp, execl, execv?
- Java: Not a statement
- Restarting cron after changing crontab file?
- Passing a hexadecimal value into a module in Verilog
- How to know what the ‘errno’ means?
- Solr: how to delete a collection?
- How to print a int64_t type in C
- How to store data in the flash memory of a Arduino Uno (ATmega328p)
- What is a blob URL and why it is used?
- How to apply a patch?
- Editing WordPress Permissions in LAMP – Ubuntu 11.10
- Rewrite URL to remap WordPress Permalink
- Using wp-uploads instead of wp-content/uploads
- What’s the proper way to setup WP-CLI on Ubuntu so that I don’t have to use the flag –allow-root?
- How can I trash multiple posts at once from the front end?
- Maintenance holding page while migrating website
- How to get a current post’s blog id
- User can not login
- Will has_category be true is used on index and one of queried posts has the category?
- What user should I use for wp-cli on Ubuntu VPS [closed]
- How to get a value from wp_dropdown_user?
- WordPress cloning issue
- How to edit content in WordPress and the Polylang – plugin? – with demosite
- Customized Essay Writing Service
- Exclude categories with only sticky posts OR count sticky post of specific category
- How to fix wp-login.php gives error 500 after migration?
- Timthumb isn’t displaying any images. “A TimThumb error has occured
- Problems loading stylesheet and permalinks after rebooting
- How do I deal with a compromised server?