TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

PSA: cp -r behaves differently on linux and macOS

2 pointsby jmlralmost 8 years ago

1 comment

schoenalmost 8 years ago
Huh, maybe that was the original inspiration for the equivalent behavior in rsync.<p>&gt; A trailing slash on the source changes this behavior to avoid creating an additional directory level at the destination. You can think of a trailing &#x2F; on a source as meaning &quot;copy the contents of this directory&quot; as opposed to &quot;copy the directory by name&quot;, but in both cases the attributes of the containing directory are transferred to the containing directory on the destination.