Skip to content

Copy

Copies a file or directory on the remote machine to a new destination.

distant fs copy /path/to/file.txt /new/path/to/file.txt

Notes

  • Directories have their entire contents recursively copied to the destination.
  • Relative paths resolve to the current working directory of the server.
distant fs copy --help
Copies a file or directory on the remote machine

Usage: distant fs copy [OPTIONS] <SRC> <DST>

Arguments:
  <SRC>  The path to the file or directory on the remote machine
  <DST>  New location on the remote machine for copy of file or directory

Options:
      --cache <CACHE>                Location to store cached data [default: /home/runner/.cache/distant/cache.toml]
      --log-level <LOG_LEVEL>        Log level to use throughout the application [possible values: off, error, warn, info, debug, trace]
      --connection <CONNECTION>      Specify a connection being managed
      --log-file <LOG_FILE>          Path to file to use for logging
      --config <CONFIG_PATH>         Configuration file to load instead of the default paths
      --unix-socket <UNIX_SOCKET>    Override the path to the Unix socket used by the manager (unix-only)
      --windows-pipe <WINDOWS_PIPE>  Override the name of the local named Windows pipe used by the manager (windows-only)
  -h, --help                         Print help