The read-symlink command is used to read the description of a symbolic link object.

Note

Command syntax

./ossutil read-symlink oss://bucket/object [--encoding-type url] [--payer requester] [-c file]
This operation requires that you have the read permission on the symbolic link object. In the output, X-Oss-Symlink-Target indicates the object the symbolic link points to. If the object to be managed is not a symbolic link object, NotSymlink is returned.

Examples

Obtain the symbolic link information of object1.
./ossutil read-symlink oss://bucket1/object1
Etag                    : 455E20DBFFF1D588B67D092C46B16DB6
Last-Modified           : 2017-04-17 14:49:42 +0800 CST
X-Oss-Symlink-Target    : a

Common options

The following table describes the options you can add to the create-symlink command.
Option Description
--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.
--loglevel Specifies the log level. The default value is null, indicating that no log files are generated. Valid values:
  • info: generates prompt logs.
  • debug: generates detailed logs that contain corresponding HTTP request and response information.
--retry-times Specifies the number of times an operation is retried if the operation fails. Valid values: 1 to 500. Default value: 10.
--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.