file get

Purpose

Copy a file to the appliance from a remote location.

Syntax

file get url localfile

Parameters

url
Uniform resource locator that is specified in one of the two following formats. In the following formats, white space is added only for readability. Do not included any white space in the URL on the command.
  • For protocols HTTP and FTP:
    protocol: // [username [:password] @]hostname [:port]/[%2F abspath/][relpath /] filename
    where
    protocol
    FTP or HTTP.
    username
    User name at the remote host. This is an optional component of URL.
    password
    Password for username at the remote host. This is an optional component of URL.
    hostname
    Remote host name or IP address.
    port
    Decimal port number of the remote server. This is an optional component of URL.
    abspath
    Absolute path for the remote file, prefixed with the 3 characters '%2F' or '%2f'. It is supported for protocol FTP and SCP and is an optional component of URL.
    relpath
    Relative path for the remote file. This path is relative to the default directory on the remote system. If username is specified, the default directory is typically the home directory of that user. This path is an optional component of URL.
    filename
    Remote file name.
  • For protocols SCP:
    protocol: // username@hostname: [%2F abspath/][relpath /] filename
    where
    protocol
    SCP.
    username
    User name at the remote host. This is an optional component of URL.
    hostname
    Remote host name or IP address. Host names that resolve to IPv6 addresses are supported; however, literal IPv6 addresses, which contain colons, are not supported because the hostname is separated from the file path with a colon.
    abspath
    Absolute path for the remote file, prefixed with the 3 characters '%2F' or '%2f'. It is supported for protocol FTP and SCP and is an optional component of URL.
    relpath
    Relative path for the remote file. This path is relative to the default directory on the remote system. If username is specified, the default directory is typically the home directory of that user. This path is an optional component of URL.
    filename
    Remote file name.
localfile
Name to be assigned to the local copy of the file. No absolute path elements (leading forward slashes) or subdirectories (forward slashes) are allowed. It must be a relative, flat name.

Related Commands

See file delete, file list, and file put.

Example

Retrieve a firmware file from a remote location and give it the name of newfirmware on the appliance.
Console> file get scp://user1@server1.raleigh.ibm.com:~/dev_bedrock.scrypt2 newfirmware.scrypt2
user1@server1.raleigh.ibm.com's password: 
dev_bedrock.scrypt2                           100%  136MB  34.0MB/s   00:04    
Wrote 142553856 bytes to local storage
Console>