- Documentation
Torch Object Storage
User Guide
Hierarchical namespace (HNS)
User guide
Object operations
User guide
Object operations
Object operations
You can use a command-line tool to perform various operations on an HNS bucket, such as uploading, downloading, and deleting resources.
Relevant commands and examples
Use the following command to upload the file1 file from your local device to the bucket1 bucket.
Use the following command to create a new directory, dir1, in the root directory of the bucket1 bucket.
Viewing object or directory details
- Use the following command to list the objects and directories under the dir1 directory.
- Use the following command to view information about the file1 object.
- Use the following command to check the size of the dir1 directory.
Use the following command to copy the file1 object from the bucket1 bucket to a new object named file3.
- Use the following command to download the file1 object from the bucket1 bucket to your local device and rename it file_download.
- Use the following command to read the contents of a text file directly from the command line and display them on the screen.
Renaming an object or directory
- Use the following command to rename the object file1 to file4.
- Use the following command to rename the directory dir1 to dir2.
Deleting an object or directory
- Use the following command to delete the file3 object.
- Use the following command to delete the dir2 directory, along with all its objects and subdirectories, recursively.
- The -r option indicates that the deletion is recursive.
Last updated: 2026.03.04 14:36:28