In this article
That last condition explains many apparently contradictory examples. The command’s source spelling matters, but so does the state of the destination before you run it. Check both before copying settings, project folders, or an app’s supporting files.
Choose the layout before copying
For these examples, source is a real directory containing note.txt. There are no symbolic links, aliases, or files with the same name at the destination.
| Command | Destination beforehand | Where note.txt ends up |
|---|---|---|
/bin/cp -R source destination | Existing directory | destination/source/note.txt |
/bin/cp -R source/ destination | Existing directory | destination/note.txt |
/bin/cp -R source destination | Does not exist | destination/note.txt |
/bin/cp -R source/ destination | Does not exist | destination/note.txt |
Use Finder’s ordinary copy and paste when you simply want a visible folder copied to another location. When the job specifically involves a Terminal command or script, /bin/cp selects Apple’s supplied implementation rather than a shell alias or another installed version.
Apple’s Terminal file-management guide introduces cp and recursive folder copying. Apple’s published cp manual documents the source-slash distinction. The manual installed on your Mac is also available with man cp.
The slash belongs to the source argument
Read a two-path command from left to right: first the source, then the destination. In /bin/cp -R source/ destination, the slash is attached to the source directory. It changes whether that directory’s enclosing name becomes another level inside an already-existing destination.
It does not mean “copy only visible files.” It also does not mean “delete whatever is already in the destination.” Those are different questions from the resulting directory layout.
Tab completion can append a slash to a directory name. Before pressing Return, inspect the completed command instead of assuming completion only saved typing. Quote paths containing spaces, and keep the slash inside the source’s quoted argument: /bin/cp -R "Source Folder/" "Destination Folder".

Screenshot: Apple’s Terminal guide, captured November 28, 2026. Recursive copying starts with cp; the source spelling and destination state still determine the layout.
The same-looking command on a different system may not implement the same rule. Autodesk’s macOS-versus-Linux support note calls out this exact difference. Check the implementation and its manual before moving a script between platforms.
Our test: four layouts, one source tree
On November 28, 2026, we tested /bin/cp on macOS 15.7.5, build 24G624. The source contained a plain file, a hidden file named .hidden, and child/nested.txt. Each command received a separate destination so an earlier copy could not influence the next result.
The four combinations produced the paths in the opening table. When the destination already existed, omitting the source slash created a nested source directory. Adding the slash put the source’s children directly inside the destination. When the destination was absent, both forms created a directory at the destination path with those children inside it.
All four copies included .hidden and the nested file, and all returned exit status 0. Existing destinations also contained a destination-only keep.txt; it remained present after either copy.
This was a controlled directory-layout test using newly created sample files. It did not measure copying speed, verify every metadata field, test a running app’s database, or establish that either command is a complete backup procedure. The original specimens and command results were retained with the publication’s research record.
Copying contents can merge and replace
The trailing slash is especially consequential when files already exist. It places source children at the destination’s top level, where matching names may collide.
We tested two more fresh destinations, each containing an older note.txt and a destination-only keep.txt. With ordinary /bin/cp -R source/ destination, the source’s new text replaced the destination’s old text. The unrelated keep.txt remained. This was a merge with replacement, not an exact mirror.
In a separate run, adding -n kept the old destination text while copying the missing hidden file. That run returned 1 on this tested macOS build. Do not assume a no-clobber copy that skipped a file has the same completion status as a full copy; inspect both the command result and the destination you intended to create.
For an interactive operation, the documented -i option asks before overwriting an existing file. For repeatable work, a new, clearly named destination is often easier to verify than a merge into a folder whose contents you have not reviewed.
Avoid substituting a wildcard casually
source/ and source/* are different inputs. The first names a directory for cp to traverse. The second asks the shell to expand a filename pattern before cp receives its arguments. Which names a pattern includes depends on the shell and its options.
Our direct directory copies included the dotfile without a wildcard. The related guide to hidden files and shell expansion explains why a command’s input list can differ from the files you expected it to inspect.
Likewise, matching paths do not prove matching permissions or every other property. If the copied data is part of an app investigation, separate the layout check from file content and metadata comparisons. A copied folder is not automatically a synchronized or fully verified replacement.
Check these three things before Return
- Implementation: is the command Apple’s
/bin/cp, or a different program or alias? - Source: does the directory argument end with
/, and is that the layout you want? - Destination: does it already exist, and could matching names be replaced?
Afterward, inspect the expected file path and the command’s completion status. If the nesting is wrong, stop and review the result before copying again into the same destination; a second run can change the conditions that caused the first surprise.


