"tahoe cp --help" doesn't explain tahoe cp clearly enough to a new user #742

Closed
opened 2009-06-21 18:44:55 +00:00 by zooko · 2 comments

From IRC:

<soul9> and...er, is cp just soppesed to copy tahoe targets to tahoe targets?
<soul9> s/soppesed/supposed						[12:49]
<soul9> i mean 'tahoe cp'
<zooko> Hm...								[12:51]
<zooko> Does "tahoe cp --help" not explain?
<soul9> no, it doesn't
<soul9> at least not to my understanding
From IRC: ``` <soul9> and...er, is cp just soppesed to copy tahoe targets to tahoe targets? <soul9> s/soppesed/supposed [12:49] <soul9> i mean 'tahoe cp' <zooko> Hm... [12:51] <zooko> Does "tahoe cp --help" not explain? <soul9> no, it doesn't <soul9> at least not to my understanding ```
zooko added the
documentation
major
defect
1.4.1
labels 2009-06-21 18:44:55 +00:00
zooko added this to the undecided milestone 2009-06-21 18:44:55 +00:00
Author

To close this ticket, either change the output of tahoe cp --help, or add a note in the output of tahoe cp --help pointing the user to the relevant docs such as source:docs/frontends/CLI.txt, or both.

To close this ticket, either change the output of `tahoe cp --help`, or add a note in the output of `tahoe cp --help` pointing the user to the relevant docs such as source:docs/frontends/CLI.txt, or both.
tahoe-lafs added
code-frontend-cli
and removed
documentation
labels 2009-12-04 05:32:52 +00:00
tahoe-lafs modified the milestone from undecided to 1.6.0 2009-12-04 05:32:52 +00:00
davidsarah commented 2010-01-14 00:13:49 +00:00
Owner

This appears to have been fixed by Brian. The current help text is:

$ tahoe cp --help
Usage: tahoe [options] cp FROM.. TO
Options:
  -q, --quiet             Operate silently.
  -V, --version           Display version numbers and exit.
      --version-and-path  Display version numbers and paths to their locations
                          and exit.
  -r, --recursive         Copy source directory recursively.
  -v, --verbose           Be noisy about what is happening.
      --caps-only         When copying to local files, write out filecaps
                          instead of actual data. (only useful for debugging and
                          tree-comparison purposes)
  -d, --node-directory=   Look here to find out which Tahoe node should be used
                          for all operations. The directory should either
                          contain a full Tahoe node, or a file named node.url
                          which points to some other Tahoe node. It should also
                          contain a file named private/aliases which contains
                          the mapping from alias name to root dirnode URI.
                          [default: ~/.tahoe]
  -u, --node-url=         URL of the tahoe node to use, a URL like
                          "http://127.0.0.1:3456". This overrides the URL found
                          in the --node-directory .
      --dir-cap=          Which dirnode URI should be used as the 'tahoe' alias.
      --help              Display this help and exit.

Use 'tahoe cp' to copy files between a local filesystem and a Tahoe virtual
filesystem. Any FROM/TO arguments that begin with an alias indicate Tahoe-side
files, and arguments which do not indicate local files. Directories will be
copied recursively. New Tahoe-side directories will be created when necessary.
Assuming that you have previously set up an alias 'home' with 'tahoe
create-alias home', here are some examples:

tahoe cp ~/foo.txt home: # creates tahoe-side home:foo.txt

tahoe cp ~/foo.txt /tmp/bar.txt home: # copies two files to home:

tahoe cp ~/Pictures home:stuff/my-pictures # copies directory recursively

You can also use a dircap as either FROM or TO target:

tahoe cp
URI:DIR2-RO:j74uhg25nwdpjpacl6rkat2yhm:kav7ijeft5h7r7rxdp5bgtlt3viv32yabqajkrdykozia5544jqa/wiki.html
./ # copy Zooko's wiki page to a local file

This command still has some limitations: symlinks, special files (device nodes,
named pipes), and non-ASCII filenames are not handled very well. Arguments
should probably not have trailing slashes. 'tahoe cp' does not behave as much
like /bin/cp as you would wish, especially with respect to trailing slashes.

which seems to address the complaint in the description.

This [appears to have been fixed](@@http://allmydata.org/trac/tahoe/changeset?new=3942@src/allmydata/scripts/cli.py&old=3900@src/allmydata/scripts/cli.py@@) [by Brian](http://allmydata.org/trac/tahoe/log/src/allmydata/scripts/cli.py). The current help text is: ``` $ tahoe cp --help Usage: tahoe [options] cp FROM.. TO Options: -q, --quiet Operate silently. -V, --version Display version numbers and exit. --version-and-path Display version numbers and paths to their locations and exit. -r, --recursive Copy source directory recursively. -v, --verbose Be noisy about what is happening. --caps-only When copying to local files, write out filecaps instead of actual data. (only useful for debugging and tree-comparison purposes) -d, --node-directory= Look here to find out which Tahoe node should be used for all operations. The directory should either contain a full Tahoe node, or a file named node.url which points to some other Tahoe node. It should also contain a file named private/aliases which contains the mapping from alias name to root dirnode URI. [default: ~/.tahoe] -u, --node-url= URL of the tahoe node to use, a URL like "http://127.0.0.1:3456". This overrides the URL found in the --node-directory . --dir-cap= Which dirnode URI should be used as the 'tahoe' alias. --help Display this help and exit. Use 'tahoe cp' to copy files between a local filesystem and a Tahoe virtual filesystem. Any FROM/TO arguments that begin with an alias indicate Tahoe-side files, and arguments which do not indicate local files. Directories will be copied recursively. New Tahoe-side directories will be created when necessary. Assuming that you have previously set up an alias 'home' with 'tahoe create-alias home', here are some examples: tahoe cp ~/foo.txt home: # creates tahoe-side home:foo.txt tahoe cp ~/foo.txt /tmp/bar.txt home: # copies two files to home: tahoe cp ~/Pictures home:stuff/my-pictures # copies directory recursively You can also use a dircap as either FROM or TO target: tahoe cp URI:DIR2-RO:j74uhg25nwdpjpacl6rkat2yhm:kav7ijeft5h7r7rxdp5bgtlt3viv32yabqajkrdykozia5544jqa/wiki.html ./ # copy Zooko's wiki page to a local file This command still has some limitations: symlinks, special files (device nodes, named pipes), and non-ASCII filenames are not handled very well. Arguments should probably not have trailing slashes. 'tahoe cp' does not behave as much like /bin/cp as you would wish, especially with respect to trailing slashes. ``` which seems to address the complaint in the description.
tahoe-lafs added the
fixed
label 2010-01-14 00:13:49 +00:00
davidsarah closed this issue 2010-01-14 00:13:49 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#742
No description provided.