After you enable the hierarchical namespace feature for a bucket, you can rename or move objects or directories in the bucket.
- The Rename operation is called to rename objects or directories.
- You can rename objects of all sizes in the OSS console. However, you can move only objects that do not exceed 1 GB in size in the OSS console.
To ensure the availability of the OSS-HDFS service or prevent data loss, do not rename the
.dlsdata/directory in which OSS-HDFS data is stored in a bucket for which hierarchical namespace and the OSS-HDFS service are enabled.
For more information about the hierarchical namespace feature, see Hierarchical namespace.
- Log on to the OSS console.
- In the left-side navigation pane, click Buckets. On the Buckets page, click the name of the desired bucket.
- In the left-side navigation pane, click Files, and rename or move the object or directory. The following table describes the operations
that you can perform to rename or move an object or a directory.
Scenario Operation Rename an object Move the pointer over the name of the object that you want to rename, and click the icon to rename the object. When you rename the object, the new name of the object must contain a suffix. Move an object In the Actions column of the object that you want to move, choose . In the Move File panel, specify the destination directory to which you want to move the object.
- To move the object to the root directory of the current bucket, leave the destination directory empty.
- To move the object to a specific directory in the current bucket, specify the directory as the destination directory. For example, to move the object to a subdirectory named subdir in a directory named destdir, set the destination directory to destdir/subdir.
Rename a directory Move the pointer over the name of the directory that you want to rename, and click the icon to rename the directory. The directory name cannot start with a forward slash (/). Move a directory You can move a directory in a similar manner in which you rename a directory. However, you must add a forward slash (/) to the new name of the directory. The following examples show how to move a directory:
- A subdirectory named subdir is located in a directory named destdir. To move subdir to another directory named destfolder, set the new directory name to /destfolder/subdir.
- A subdirectory named subdir is located in a directory named destdir. To move subdir to the root directory of the current bucket, set the new directory name to /subdir.