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

Note
  • 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.
  • For more information about the command used to create symbolic links, see create-symlink.

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 method used to encode 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 pay-by-requester, set this option to requester.
--proxy-host Specifies the URL of the proxy server. HTTP, HTTPS, and SOCKS5 proxies are supported. An example of the URL is http://120.79. **.**:3128 or socks5://120.79. **. **:1080.
--proxy-user Specifies the username for the proxy server. The default value is null.
--proxy-pwd Specifies the password for the proxy server. The default value is null.
Note For more information about common options, see View all supported options.