Updated on 2023-12-22 GMT+08:00

Deleting a File or Folder

Delete an existing file or folder as needed.

Context

Deleting a folder will also delete all files in it. Ensure that all files in a folder can be deleted before deleting the folder.

Deleting unwanted files or folders saves space and costs.

You can use lifecycle management to periodically delete some unwanted files or batch delete all files or folders in OBS. For details, see Lifecycle Management.

Procedure

  1. Log in to OBS Browser+.
  2. Go to the bucket from which you want to delete a file or folder.
  3. Right-click the file or folder to be deleted and click Delete.

    You can select multiple files or folders and choose More > Delete above the list to batch delete them.

  4. In the displayed dialog box, click OK.

Important Notes

In big data scenarios, parallel file systems usually have deep directory levels and each directory has a large number of files. In such case, deleting directories from parallel file systems may fail due to timeout. To address this problem, you are advised to delete directories in either of the following ways:

  1. On the Hadoop client that has OBSA, an OBS client plugin, embedded, run the hadoop fs - rmr obs://{Name of a parallel file system}/{Directory name} command.
  2. Configure a lifecycle rule for directories so that they can be deleted in background based on the preset lifecycle rule.