alpacon cp

Copy files between your local machine and a remote server using the cp command. This command supports uploading, downloading, and specifying authentication details such as username and groupname.

alpacon cp [SOURCE...] [DESTINATION] [flags]

Options

  -h, --help               help for cp
  -u, --username string    Specify username
  -g, --groupname string   Specify groupname
  -r, --recursive          Recursively copy directories

Examples

Upload multiple files to a remote server:

alpacon cp /local/path/file1.txt /local/path/file2.txt [SERVER_NAME]:/remote/path/

Upload or download directory:

alpacon cp -r /local/path/directory [SERVER_NAME]:/remote/path/
alpacon cp -r [SERVER_NAME]:/remote/path/directory /local/path/

Download files from a remote server to a local destination:

alpacon cp [SERVER_NAME]:/remote/path1 /remote/path2 /local/destination/path

Specify username:

alpacon cp /local/path/file.txt [USER_NAME]@[SERVER_NAME]:/remote/path/
alpacon cp -u [USER_NAME] /local/path/file.txt [SERVER_NAME]:/remote/path/

Specify groupname:

alpacon cp -g [GROUP_NAME] /local/path/file.txt [SERVER_NAME]:/remote/path/