Synopsis
mdc download <filename> [options]
The mdc download
command allows users to download any single file filename
from the remote storage to the local storage. Users can prepend a path to the file to access files within directories that may not be present on the local compute system. Only files can be downloaded at this time, not directories. Wildcards are not supported at this time.
Any files downloaded will have the prefix _downloaded_
prepended to the file name on the local storage to clearly indicate to the user that this file has been downloaded. If there is a file of the same name (_downloaded_<filename>
), in the local directory, users will be prompted to confirm to overwrite.
Options
None
Example(s)
Below, you will find several small examples of the behaviour of the download command, based on the two directory structures listed below.
Local directory structure
origin/
sub/
Remote directory structure
/remote/work/
top.txt
sub/
sub.txt
only_remote/
top.txt
Download behavior (assuming user starts in local origin directory)
Command(s)
|
Result
|
mdc download top.txt
|
-
/remote/work/top.txt downloaded to /origin/_downloaded_top.txt
-
User is prompted to override file if _downloaded_top.txt already exists in local dir
|
mdc download sub/sub.txt
|
-
/remote/work/sub/sub.txt downloaded to /origin/_downloaded_sub.txt
-
User is prompted to override file if _downloaded_sub.txt already exists in local dir
|
mdc download only_remote/top.txt
|
-
/remote/work/only_remote/top.txt downloaded to /origin/_downloaded_top.txt
-
User is prompted to override file if _downloaded_top.txt already exists in local dir
|
cd sub
mdc download ../top.txt
|
-
/remote/work/sub/../top.txt downloaded to /origin/sub/_downloaded_top.txt
-
User is prompted to override file if _downloaded_top.txt already exists in local dir
|
cd sub
mdc download sub.txt
|
-
/remote/work/sub/sub.txt downloaded to /origin/sub/_downloaded_sub.txt
-
User is prompted to override file if _downloaded_sub.txt already exists in local dir
|
mdc download /remote/work/sub/sub.txt
|
-
/remote/work/sub/sub.txt downloaded to /origin/_downloaded_sub.txt
-
User is prompted to override file if _downloaded_sub.txt already exists in local dir
|
mdc download /some/path/outside/remote/work/outside.txt
|
-
An error message indicating the file is not allowed to be downloaded will be presented to the user
|
mdc download \*
|
-
An error message indicating an invalid filename
|
mdc download not_a_file
|
-
An error message indicating file does not exist
|