You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Instances
Managing files in ECS instances via Terminal
Copy page
Download PDF
Managing files in ECS instances via Terminal
You can use Terminal to manage files on an ECS instance online. Terminal is suitable for scenarios such as remotely viewing text files, uploading deployment files, downloading diagnostic results, and organizing directories. This topic describes how to preview, upload, download, rename, and delete files in Terminal.​
Tip​
This feature is currently in invite-only beta testing. If you need to use it, pleasecontact your account manager to apply.​
Prerequisites​
The current account has the permissions to access and manage the target directory.​
Preview files​
Scenarios​
When you need to quickly view configuration content, log snippets, or text scripts, you can preview files online without downloading them to your local computer first.​
Instructions​
  • Only text files such as JSON, MD, and TXT are supported.​
  • The size of a single file preview cannot exceed 1 MB.​
Procedure​
  1. Log in to the ECS instance by using Terminal (Linux) or Terminal (Windows).​
  1. Click "File management".​
  1. In the file list, find the target file and then click "Preview" in the Actions column.​
  1. View the file content in the preview pane.​
Create folders​
Scenarios​
If you plan to upload data files of different projects or categories, you can create multiple folders to store related files by category, so that the ECS instance can read files in the corresponding directories as needed for different tasks.​
Procedure​
  1. Log in to the ECS instance by using Terminal (Linux) or Terminal (Windows).​
  1. Click "File management".​
  1. On the file management page, click the "Create folder" button.​
  1. In the dialog box that appears, enter the folder name.​
  1. Click the "Confirm" button to complete the operation.​
Upload files or folders​
Scenarios​
To transfer deployment packages, scripts, configuration files, or directories to an ECS instance, you can upload files or folders directly in Terminal.​
Instructions​
  • You can upload a single file or a folder.​
  • You can pause, resume, or cancel an upload task.​
  • Multiple upload tasks are queued in the order of submission, and only one upload task runs at a time.​
  • If an exception occurs during the upload, the system prompts you to retry or cancel the operation.​
Procedure​
  1. Log in to the ECS instance by using Terminal (Linux) or Terminal (Windows).​
  1. Click "File management".​
  1. Above the file list, click the "Upload" button and select "Upload file" or "Upload folder" as needed.​
  1. In the dialog box that appears, select the local file or folder that you want to upload to the ECS instance.​
  1. You can view the upload progress in the lower right corner. Before the upload is complete, you can also pause, resume, or cancel the task as needed.​
  • The progress window is a file transfer list that contains two modules: upload tasks and download tasks. After a file transfer is complete, the corresponding entry shows a progress indicator of 100%.​
Download the files​
Scenarios​
When you need to save logs, exported results, or other files on the instance to your local computer, you can use the download feature.​
Instructions​
  • A file of 20 MB or smaller triggers a browser download directly.​
  • When you download a file larger than 20 MB, the system displays a local storage window in which you can set the file name and select a save location.​
  • If the browser prevents you from saving the file to a restricted local path, change the save location as prompted, and then try again.​
Procedure​
  1. Log in to the ECS instance by using Terminal (Linux) or Terminal (Windows).​
  1. Click "File management".​
  1. On the file management page, click "Download" in the Actions column of the target file or folder.​
  1. The file is then automatically downloaded through your browser.​
Rename a file​
Scenarios​
When you need to organize the directory structure or change file names, you can use the rename feature.​
warning​
To keep your ECS instance running securely, you cannot rename its core files, such as system files and environment configuration files.​
Procedure​
  1. Log in to the ECS instance by using Terminal (Linux) or Terminal (Windows).​
  1. Click "File management".​
  1. On the file management page, locate the file or folder you want to rename, and click the "Rename" button in the "Actions" column.​
  1. Enter the new name in the pop-up window and click the "Confirm" button to complete the operation.​
Delete a file​
Scenarios​
To clear unnecessary files, directories, or symbolic links, you can use the delete feature.​
warning​
  • To keep your ECS instance running securely, you cannot delete its core files, such as system files and environment configuration files.​
  • After you delete a file, directory, or symbolic link, it cannot be recovered. Proceed with caution.​
Procedure​
  1. Log in to the ECS instance by using Terminal (Linux) or Terminal (Windows).​
  1. Click "File management".​
  1. On the file management page, click "Delete" in the Actions column of the target file or folder.​
  1. In the dialog box that appears, confirm the risk information, and then click the "Delete" button to complete the operation.​
Last updated: 2026.10.14 10:20:02