The create-symlink command is used to create a symbolic link (also known as soft link).
- The commands described in this topic apply to Linux. To use the commands in other systems, replace ./ossutil in the command with the actual executable program name. For example, you can use the help command in 32-bit Windows systems by running ossutil32.exe help.
- For more information about symbolic links, see Configure symbolic links.
./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 pay-by-requester, 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.