-
Notifications
You must be signed in to change notification settings - Fork 60
Update cp docs: permissions preserved by default #5180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
btshrewsbury-viam
merged 3 commits into
main
from
claude/update-cp-preserve-permissions-2026-07-11
Jul 13, 2026
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1260,7 +1260,7 @@ viam machines part cp --part=123 my_file machine:/home/user/ | |
| # Recursively copy a directory to a machine: | ||
| viam machines part cp --part=123 -r my_dir machine:/home/user/ | ||
|
|
||
| # Copy multiple files to a machine with recursion and keep original permissions and metadata for the files: | ||
| # Copy multiple files to a machine with recursion and preserve exact permissions and timestamps: | ||
| viam machines part cp --part=123 -r -p my_dir my_file machine:/home/user/some/existing/dir/ | ||
|
|
||
| # Copy a single file from a machine to a local destination: | ||
|
|
@@ -1269,7 +1269,7 @@ viam machines part cp --part=123 machine:my_file ~/Downloads/ | |
| # Recursively copy a directory from a machine to a local destination: | ||
| viam machines part cp --part=123 -r machine:my_dir ~/Downloads/ | ||
|
|
||
| # Copy multiple files from the machine to a local destination with recursion and keep original permissions and metadata for the files: | ||
| # Copy multiple files from the machine to a local destination with recursion and preserve exact permissions and timestamps: | ||
| viam machines part cp --part=123 -r -p machine:my_dir machine:my_file ~/some/existing/dir/ | ||
| ``` | ||
|
|
||
|
|
@@ -1278,7 +1278,7 @@ viam machines part cp --part=123 -r -p machine:my_dir machine:my_file ~/some/exi | |
| | -------- | ----------- | --------- | | ||
| | `--part` | Part ID for which the command is being issued. | **Required** | | ||
| | `--recursive`, `-r` | Recursively copy files. Default: `false`. | Optional | | ||
| | `--preserve`, `-p` | Preserve modification times and file mode bits from the source files. Default: `false`. | Optional | | ||
| | `--preserve`, `-p` | Preserve modification times and set exact file permissions from the source, bypassing umask. File permissions are always transferred by default; this flag additionally preserves timestamps and forces exact permission bits. Default: `false`. | Optional | | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would change "bypassing umask" to "overriding the destination
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| ### `machines part tunnel` | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change "matching
scpbehavior" to "respecting the destinationumask"There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in beec185.
Generated by Claude Code