The create-symlink command is used to create a symbolic link (also known as soft link).
Note For more information about symbolic links, see Set a symbolic link.
./ossutil create-symlink cloud_url target_object [--encoding-type url] [--payer requester] [-c file]
This command creates a symbolic link object named b for the a.txt object in the path folder of bucket1.
./ossutil create-symlink oss://bucket1/b oss://bucket1/path/a.txt
Note The system does not perform the following checks when symbolic links are created:
- Whether the mapped object exists.
- Whether the mapped object is valid.
- Whether the user has permission to access the mapped object.
- The preceding checks are performed when you attempt to call operations such as GetObject to access the mapped object.
- If the object to be added already exists and you have permissions to access the object, the newly added object will overwrite the existing object.
The following table describes the options you can add to the create-symlink command.
|--encoding-type||Specifies the encoding type of the object name. If this option is specified, this value must be url. If this option is not specified, the object name is not encoded. Bucket names cannot be URL-encoded.|
|--retry-times||Specifies the number of times an operation is retried if the operation fails. Valid values: 1 to 500. Default value: 10.|
|--loglevel||Specifies the log level. The default value is null, indicating that no log files are
generated. Valid values:
|--payer||Specifies the payer of the request. To enable the pay-by-requester mode, set this option to requester.|
|--proxy-host||Specifies the URL of the proxy server. HTTP, HTTPS, and SOCKS5 are supported. An example of the URL is http://120.79. **.**:3128 or socks5://120.79. **. **:1080.|
|--proxy-user||Specifies the username of the proxy server. The default value is null.|
|--proxy-pwd||Specifies the password of the proxy server. The default value is null.|
Note For more information about common options, see View all supported options.