======= Purpose ======= ``ucp`` is a script that copies files or directories. It is an URL-enabled version of the ``cp`` system command. Via ``ll.url`` and ``ll.orasql`` ``ucp`` supports ``ssh`` and ``oracle`` URLs. ======= Options ======= ``ucp`` supports the following options: ``urls`` Two or more URLs. If more than two URLs are given or the last URL refers to an existing directory, the last URL is the target directory. All other sources are copied into this target directory. Otherwise one file is copied to another file. ``-v``, ``--verbose`` (``false``, ``no``, ``0``, ``true``, ``yes`` or ``1``) Give a report during the copy process about the files copied and their sizes. ``-c``, ``--color`` (``yes``, ``no`` or ``auto``) Should the output be colored? If ``auto`` is specified (the default) then the output is colored if stdout is a terminal. ``-u``, ``--user`` A user id or name. If given ``ucp`` will change the owner of the target files. ``-g``, ``--group`` A group id or name. If given ``ucp`` will change the group of the target files. ``-r``, ``--recursive`` (``false``, ``no``, ``0``, ``true``, ``yes`` or ``1``) Copies files recursively. ``-x``, ``--ignoreerrors`` (``false``, ``no``, ``0``, ``true``, ``yes`` or ``1``) Ignores errors occuring during the copy process (otherwise the copy process is aborted). ``-i``, ``--include`` (pattern) Only copy files that match the pattern. ``-e``, ``--exclude`` (pattern) Don't copy files that match the pattern. ``--enterdir`` (pattern) Only enter directories that match the pattern. ``--skipdir`` (pattern) Skip directories that match the pattern. ``--ignorecase`` (``false``, ``no``, ``0``, ``true``, ``yes`` or ``1``) Perform case-insensitive pattern matching. ======== Examples ======== Copy one file to another: $ ucp foo.txt bar.txt Copy a file into an existing directory: $ ucp foo.txt dir/ Copy multiple files into a new or existing directory (and give a progress report): $ ucp foo.txt bar.txt baz.txt dir/ -v ucp: foo.txt -> dir/foo.txt (1,114 bytes) ucp: bar.txt -> dir/bar.txt (2,916 bytes) ucp: baz.txt -> dir/baz.txt (35,812 bytes) Recursively copy the schema objects in an Oracle database to a local directory: ucp oracle://user:pwd@oracle.example.org/ db/ -r Recursively copy the schema objects in an Oracle database to a remote directory: ucp oracle://user:pwd@oracle.example.org/ ssh://user@www.example.org/~/db/ -r ================================= def ``main``​(``args``=``None``): =================================